mm: make snapshotting pages for stable writes a per-bio operation
Walking a bio's page mappings has proved problematic, so create a new bio flag to indicate that a bio's data needs to be snapshotted in order to guarantee stable pages during writeback. Next, for the one user (ext3/jbd) of snapshotting, hook all the places where writes can be initiated without PG_writeback set, and set BIO_SNAP_STABLE there. We must also flag journal "metadata" bios for stable writeout, since file data can be written through the journal. Finally, the MS_SNAP_STABLE mount flag (only used by ext3) is now superfluous, so get rid of it. [akpm@linux-foundation.org: rename _submit_bh()'s `flags' to `bio_flags', delobotomize the _submit_bh declaration] [akpm@linux-foundation.org: teeny cleanup] Signed-off-by:Darrick J. Wong <darrick.wong@oracle.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Artem Bityutskiy <dedekind1@gmail.com> Reviewed-by:
Jan Kara <jack@suse.cz> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Showing
- fs/buffer.c 8 additions, 1 deletionfs/buffer.c
- fs/ext3/super.c 0 additions, 1 deletionfs/ext3/super.c
- fs/jbd/commit.c 22 additions, 3 deletionsfs/jbd/commit.c
- include/linux/blk_types.h 2 additions, 1 deletioninclude/linux/blk_types.h
- include/linux/buffer_head.h 1 addition, 0 deletionsinclude/linux/buffer_head.h
- include/uapi/linux/fs.h 0 additions, 1 deletioninclude/uapi/linux/fs.h
- mm/bounce.c 1 addition, 20 deletionsmm/bounce.c
- mm/page-writeback.c 0 additions, 4 deletionsmm/page-writeback.c
Loading
Please register or sign in to comment