Loading fs/gfs2/log.c +20 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #include <linux/gfs2_ondisk.h> #include <linux/crc32.h> #include <linux/lm_interface.h> #include <linux/delay.h> #include "gfs2.h" #include "incore.h" Loading Loading @@ -142,7 +143,7 @@ static int gfs2_ail1_empty_one(struct gfs2_sbd *sdp, struct gfs2_ail *ai, int fl return list_empty(&ai->ai_ail1_list); } void gfs2_ail1_start(struct gfs2_sbd *sdp, int flags) static void gfs2_ail1_start(struct gfs2_sbd *sdp, int flags) { struct list_head *head = &sdp->sd_ail1_list; u64 sync_gen; Loading Loading @@ -689,3 +690,21 @@ void gfs2_log_shutdown(struct gfs2_sbd *sdp) up_write(&sdp->sd_log_flush_lock); } /** * gfs2_meta_syncfs - sync all the buffers in a filesystem * @sdp: the filesystem * */ void gfs2_meta_syncfs(struct gfs2_sbd *sdp) { gfs2_log_flush(sdp, NULL); for (;;) { gfs2_ail1_start(sdp, DIO_ALL); if (gfs2_ail1_empty(sdp, DIO_ALL)) break; msleep(10); } } fs/gfs2/log.h +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ static inline void gfs2_log_pointers_init(struct gfs2_sbd *sdp, unsigned int gfs2_struct2blk(struct gfs2_sbd *sdp, unsigned int nstruct, unsigned int ssize); void gfs2_ail1_start(struct gfs2_sbd *sdp, int flags); int gfs2_ail1_empty(struct gfs2_sbd *sdp, int flags); int gfs2_log_reserve(struct gfs2_sbd *sdp, unsigned int blks); Loading @@ -61,5 +60,6 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl); void gfs2_log_commit(struct gfs2_sbd *sdp, struct gfs2_trans *trans); void gfs2_log_shutdown(struct gfs2_sbd *sdp); void gfs2_meta_syncfs(struct gfs2_sbd *sdp); #endif /* __LOG_DOT_H__ */ fs/gfs2/meta_io.c +0 −17 Original line number Diff line number Diff line Loading @@ -574,20 +574,3 @@ struct buffer_head *gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen) return first_bh; } /** * gfs2_meta_syncfs - sync all the buffers in a filesystem * @sdp: the filesystem * */ void gfs2_meta_syncfs(struct gfs2_sbd *sdp) { gfs2_log_flush(sdp, NULL); for (;;) { gfs2_ail1_start(sdp, DIO_ALL); if (gfs2_ail1_empty(sdp, DIO_ALL)) break; msleep(10); } } fs/gfs2/meta_io.h +0 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,6 @@ static inline int gfs2_meta_inode_buffer(struct gfs2_inode *ip, } struct buffer_head *gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen); void gfs2_meta_syncfs(struct gfs2_sbd *sdp); #define buffer_busy(bh) \ ((bh)->b_state & ((1ul << BH_Dirty) | (1ul << BH_Lock) | (1ul << BH_Pinned))) Loading Loading
fs/gfs2/log.c +20 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #include <linux/gfs2_ondisk.h> #include <linux/crc32.h> #include <linux/lm_interface.h> #include <linux/delay.h> #include "gfs2.h" #include "incore.h" Loading Loading @@ -142,7 +143,7 @@ static int gfs2_ail1_empty_one(struct gfs2_sbd *sdp, struct gfs2_ail *ai, int fl return list_empty(&ai->ai_ail1_list); } void gfs2_ail1_start(struct gfs2_sbd *sdp, int flags) static void gfs2_ail1_start(struct gfs2_sbd *sdp, int flags) { struct list_head *head = &sdp->sd_ail1_list; u64 sync_gen; Loading Loading @@ -689,3 +690,21 @@ void gfs2_log_shutdown(struct gfs2_sbd *sdp) up_write(&sdp->sd_log_flush_lock); } /** * gfs2_meta_syncfs - sync all the buffers in a filesystem * @sdp: the filesystem * */ void gfs2_meta_syncfs(struct gfs2_sbd *sdp) { gfs2_log_flush(sdp, NULL); for (;;) { gfs2_ail1_start(sdp, DIO_ALL); if (gfs2_ail1_empty(sdp, DIO_ALL)) break; msleep(10); } }
fs/gfs2/log.h +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ static inline void gfs2_log_pointers_init(struct gfs2_sbd *sdp, unsigned int gfs2_struct2blk(struct gfs2_sbd *sdp, unsigned int nstruct, unsigned int ssize); void gfs2_ail1_start(struct gfs2_sbd *sdp, int flags); int gfs2_ail1_empty(struct gfs2_sbd *sdp, int flags); int gfs2_log_reserve(struct gfs2_sbd *sdp, unsigned int blks); Loading @@ -61,5 +60,6 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl); void gfs2_log_commit(struct gfs2_sbd *sdp, struct gfs2_trans *trans); void gfs2_log_shutdown(struct gfs2_sbd *sdp); void gfs2_meta_syncfs(struct gfs2_sbd *sdp); #endif /* __LOG_DOT_H__ */
fs/gfs2/meta_io.c +0 −17 Original line number Diff line number Diff line Loading @@ -574,20 +574,3 @@ struct buffer_head *gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen) return first_bh; } /** * gfs2_meta_syncfs - sync all the buffers in a filesystem * @sdp: the filesystem * */ void gfs2_meta_syncfs(struct gfs2_sbd *sdp) { gfs2_log_flush(sdp, NULL); for (;;) { gfs2_ail1_start(sdp, DIO_ALL); if (gfs2_ail1_empty(sdp, DIO_ALL)) break; msleep(10); } }
fs/gfs2/meta_io.h +0 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,6 @@ static inline int gfs2_meta_inode_buffer(struct gfs2_inode *ip, } struct buffer_head *gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen); void gfs2_meta_syncfs(struct gfs2_sbd *sdp); #define buffer_busy(bh) \ ((bh)->b_state & ((1ul << BH_Dirty) | (1ul << BH_Lock) | (1ul << BH_Pinned))) Loading