.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
---|
3 | 4 | * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. |
---|
4 | | - * |
---|
5 | | - * This copyrighted material is made available to anyone wishing to use, |
---|
6 | | - * modify, copy, or redistribute it subject to the terms and conditions |
---|
7 | | - * of the GNU General Public License version 2. |
---|
8 | 5 | */ |
---|
9 | 6 | |
---|
10 | 7 | #ifndef __LOG_DOT_H__ |
---|
.. | .. |
---|
51 | 48 | |
---|
52 | 49 | static inline void gfs2_ordered_add_inode(struct gfs2_inode *ip) |
---|
53 | 50 | { |
---|
54 | | - struct gfs2_sbd *sdp; |
---|
| 51 | + struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); |
---|
55 | 52 | |
---|
56 | | - if (!gfs2_is_ordered(ip)) |
---|
| 53 | + if (gfs2_is_jdata(ip) || !gfs2_is_ordered(sdp)) |
---|
57 | 54 | return; |
---|
58 | 55 | |
---|
59 | | - sdp = GFS2_SB(&ip->i_inode); |
---|
60 | | - if (!test_bit(GIF_ORDERED, &ip->i_flags)) { |
---|
| 56 | + if (list_empty(&ip->i_ordered)) { |
---|
61 | 57 | spin_lock(&sdp->sd_ordered_lock); |
---|
62 | | - if (!test_and_set_bit(GIF_ORDERED, &ip->i_flags)) |
---|
63 | | - list_add(&ip->i_ordered, &sdp->sd_log_le_ordered); |
---|
| 58 | + if (list_empty(&ip->i_ordered)) |
---|
| 59 | + list_add(&ip->i_ordered, &sdp->sd_log_ordered); |
---|
64 | 60 | spin_unlock(&sdp->sd_ordered_lock); |
---|
65 | 61 | } |
---|
66 | 62 | } |
---|
67 | | -extern void gfs2_ordered_del_inode(struct gfs2_inode *ip); |
---|
68 | | -extern unsigned int gfs2_struct2blk(struct gfs2_sbd *sdp, unsigned int nstruct, |
---|
69 | | - unsigned int ssize); |
---|
70 | 63 | |
---|
| 64 | +extern void gfs2_ordered_del_inode(struct gfs2_inode *ip); |
---|
| 65 | +extern unsigned int gfs2_struct2blk(struct gfs2_sbd *sdp, unsigned int nstruct); |
---|
| 66 | +extern void gfs2_remove_from_ail(struct gfs2_bufdata *bd); |
---|
71 | 67 | extern void gfs2_log_release(struct gfs2_sbd *sdp, unsigned int blks); |
---|
72 | 68 | extern int gfs2_log_reserve(struct gfs2_sbd *sdp, unsigned int blks); |
---|
73 | 69 | extern void gfs2_write_log_header(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd, |
---|
74 | | - u64 seq, u32 tail, u32 flags, int op_flags); |
---|
| 70 | + u64 seq, u32 tail, u32 lblock, u32 flags, |
---|
| 71 | + int op_flags); |
---|
75 | 72 | extern void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl, |
---|
76 | 73 | u32 type); |
---|
77 | 74 | extern void gfs2_log_commit(struct gfs2_sbd *sdp, struct gfs2_trans *trans); |
---|
78 | 75 | extern void gfs2_ail1_flush(struct gfs2_sbd *sdp, struct writeback_control *wbc); |
---|
| 76 | +extern void log_flush_wait(struct gfs2_sbd *sdp); |
---|
79 | 77 | |
---|
80 | | -extern void gfs2_log_shutdown(struct gfs2_sbd *sdp); |
---|
81 | 78 | extern int gfs2_logd(void *data); |
---|
82 | 79 | extern void gfs2_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd); |
---|
83 | 80 | extern void gfs2_glock_remove_revoke(struct gfs2_glock *gl); |
---|