Remove ext3 filesystem driver
Subsystems (6)
Jan Kara
maintainerv2 cover Remove ext3 filesystem driver
Hello,
here is the second iteration of my patches to remove ext3 filesystem driver.
Changes since the first version are:
* Regenerated the patch removing ext3 (using git format-patch -D) so that it's not so huge
* Added Kconfig option handling so that old configs with EXT3_FS set but not EXT4_FS set still result in a kernel supporting ext3 filesystem
* Created a patch updating ext4 Kconfig entry to assure users their old ext3 filesystems stay on-disk format compatible
* Added acks
If there won't be further objections, I will queue the series in my tree for the next merge window.
Honza
Jan Kara
maintainerPATCH v2 1/4 doc: Update doc about journalling layer
Documentation of journalling layer in Documentation/DocBook/filesystems.tmpl speaks about JBD layer. Since that is going away, update the documentation to speak about JBD2. Also update the parts that have changed since someone last touched the document and remove some parts which are just misleading and outdated.
--- Documentation/DocBook/filesystems.tmpl | 178 +++++++++++++-------------------- 1 file changed, 67 insertions(+), 111 deletions(-)
Documentation/DocBook/filesystems.tmpl +67 -111
@@ -146,36 +146,30 @@ The journalling layer is easy to use. You need to first of all create a journal_t data structure. There are two calls to do this dependent on how you decide to allocate the physical -media on which the journal resides. The journal_init_inode() call -is for journals stored in filesystem inodes, or the journal_init_dev() -call can be use for journal stored on a raw device (in a continuous range +media on which the journal resides. The jbd2_journal_init_inode() call +is for journals stored in filesystem inodes, or the jbd2_journal_init_dev() +call can be used for journal stored on a raw device (in a continuous range of blocks). A journal_t is a typedef for a struct pointer, so when -you are finally finished make sure you call journal_destroy() on it +you are finally finished make sure you call jbd2_journal_destroy() on it to free up any used kernel memory. </para> <para> Once you have got your journal_t object you need to 'mount' or load the journal -file, unless of course you haven't initialised it yet - in which case you -need to call journal_create(). +file. The journalling layer expects the space for the journal was already +allocated and initialized properly by the userspace tools. When loading the +journal you must call jbd2_journal_load() to process journal contents. If the +client file system detects the journal contents does not need to be processed +(or even need not have valid contents), it may call jbd2_journal_wipe() to +clear the journal contents before calling jbd2_journal_load(). </para> <para> -Most of the time however your journal file will already have been created, but -before you load it you must call journal_wipe() to empty the journal file. -Hang on, you say , what if the filesystem wasn't cleanly umount()'d . Well, it is the -job of the client file system to detect this and skip the call to journal_wipe(). -</para> - -<para> -In either case the next call should be to journal_load() which prepares the -journal file for use. Note that journal_wipe(..,0) calls journal_skip_recovery() -for you if it detects any outstanding transactions in the journal and similarly -journal_load() will call journal_recover() if necessary. -I would advise reading fs/ext3/super.c for examples on this stage. -[RGG: Why is the journal_wipe() call necessary - doesn't this needlessly -complicate the API. Or isn't a good idea for the journal layer to hide -dirty mounts from the client fs] +Note that jbd2_journal_wipe(..,0) calls jbd2_journal_skip_recovery() for you if +it detects any outstanding transactions in the journal and similarly +jbd2_journal_load() will call jbd2_journal_recover() if necessary. I would +advise reading ext4_load_journal() in fs/ext4/super.c for examples on this +stage. </para> <para>
@@ -189,41 +183,41 @@ You still need to actually journal your filesystem changes, this is done by wrapping them into transactions. Additionally you also need to wrap the modification of each of the buffers with calls to the journal layer, so it knows what the modifications -you are actually making are. To do this use journal_start() which +you are actually making are. To do this use jbd2_journal_start() which returns a transaction handle. </para> <para> -journal_start() -and its counterpart journal_stop(), which indicates the end of a transaction -are nestable calls, so you can reenter a transaction if necessary, -but remember you must call journal_stop() the same number of times as -journal_start() before the transaction is completed (or more accurately -leaves the update phase). Ext3/VFS makes use of this feature to simplify -quota support. +jbd2_journal_start() +and its counterpart jbd2_journal_stop(), which indicates the end of a +transaction are nestable calls, so you can reenter a transaction if necessary, +but remember you must call jbd2_journal_stop() the same number of times as +jbd2_journal_start() before the transaction is completed (or more accurately +leaves the update phase). Ext4/VFS makes use of this feature to simplify +handling of inode dirtying, quota support, etc. </para> <para> Inside each transaction you need to wrap the modifications to the individual buffers (blocks). Before you start to modify a buffer you -need to call journal_get_{create,write,undo}_access() as appropriate, +need to call jbd2_journal_get_{create,write,undo}_access() as appropriate, this allows the journalling layer to copy the unmodified data if it needs to. After all the buffer may be part of a previously uncommitted transaction. At this point you are at last ready to modify a buffer, and once -you are have done so you need to call journal_dirty_{meta,}data(). +you are have done so you need to call jbd2_journal_dirty_{meta,}data(). Or if you've asked for access to a buffer you now know is now longer -required to be pushed back on the device you can call journal_forget() +required to be pushed back on the device you can call jbd2_journal_forget() in much the same way as you might have used bforget() in the past. </para> <para> -A journal_flush() may be called at any time to commit and checkpoint +A jbd2_journal_flush() may be called at any time to commit and checkpoint all your transactions. </para> <para> -Then at umount time , in your put_super() you can then call journal_destroy() +Then at umount time , in your put_super() you can then call jbd2_journal_destroy() to clean up your in-core journal object. </para>
@@ -231,53 +225,68 @@ to clean up your in-core journal object. Unfortunately there a couple of ways the journal layer can cause a deadlock. The first thing to note is that each task can only have a single outstanding transaction at any one time, remember nothing -commits until the outermost journal_stop(). This means +commits until the outermost jbd2_journal_stop(). This means you must complete the transaction at the end of each file/inode/address etc. operation you perform, so that the journalling system isn't re-entered on another journal. Since transactions can't be nested/batched across differing journals, and another filesystem other than -yours (say ext3) may be modified in a later syscall. +yours (say ext4) may be modified in a later syscall. </para> <para> -The second case to bear in mind is that journal_start() can +The second case to bear in mind is that jbd2_journal_start() can block if there isn't enough space in the journal for your transaction (based on the passed nblocks param) - when it blocks it merely(!) needs to wait for transactions to complete and be committed from other tasks, -so essentially we are waiting for journal_stop(). So to avoid -deadlocks you must treat journal_start/stop() as if they +so essentially we are waiting for jbd2_journal_stop(). So to avoid +deadlocks you must treat jbd2_journal_start/stop() as if they were semaphores and include them in your semaphore ordering rules to prevent -deadlocks. Note that journal_extend() has similar blocking behaviour to -journal_start() so you can deadlock here just as easily as on journal_start(). +deadlocks. Note that jbd2_journal_extend() has similar blocking behaviour to +jbd2_journal_start() so you can deadlock here just as easily as on +jbd2_journal_start(). </para> <para> Try to reserve the right number of blocks the first time. ;-). This will be the maximum number of blocks you are going to touch in this transaction. -I advise having a look at at least ext3_jbd.h to see the basis on which -ext3 uses to make these decisions. +I advise having a look at at least ext4_jbd.h to see the basis on which +ext4 uses to make these decisions. </para> <para> Another wriggle to watch out for is your on-disk block allocation strategy. -why? Because, if you undo a delete, you need to ensure you haven't reused any -of the freed blocks in a later transaction. One simple way of doing this -is make sure any blocks you allocate only have checkpointed transactions -listed against them. Ext3 does this in ext3_test_allocatable(). +Why? Because, if you do a delete, you need to ensure you haven't reused any +of the freed blocks until the transaction freeing these blocks commits. If you +reused these blocks and crash happens, there is no way to restore the contents +of the reallocated blocks at the end of the last fully committed transaction. + +One simple way of doing this is to mark blocks as free in internal in-memory +block allocation structures only after the transaction freeing them commits. +Ext4 uses journal commit callback for this purpose. +</para> + +<para> +With journal commit callbacks you can ask the journalling layer to call a +callback function when the transaction is finally committed to disk, so that +you can do some of your own management. You ask the journalling layer for +calling the callback by simply setting journal->j_commit_callback function +pointer and that function is called after each transaction commit. You can also +use transaction->t_private_list for attaching entries to a transaction that +need processing when the transaction commits. </para> <para> -Lock is also providing through journal_{un,}lock_updates(), -ext3 uses this when it wants a window with a clean and stable fs for a moment. -eg. +JBD2 also provides a way to block all transaction updates via +jbd2_journal_{un,}lock_updates(). Ext4 uses this when it wants a window with a +clean and stable fs for a moment. E.g. </para> <programlisting> - journal_lock_updates() //stop new stuff happening.. - journal_flush() // checkpoint everything. + jbd2_journal_lock_updates() //stop new stuff happening.. + jbd2_journal_flush() // checkpoint everything. ..do stuff on stable fs - journal_unlock_updates() // carry on with filesystem use. + jbd2_journal_unlock_updates() // carry on with filesystem use. </programlisting> <para>
@@ -286,29 +295,6 @@ if you allow unprivileged userspace to trigger codepaths containing these calls. </para> -<para> -A new feature of jbd since 2.5.25 is commit callbacks with the new -journal_callback_set() function you can now ask the journalling layer -to call you back when the transaction is finally committed to disk, so that -you can do some of your own management. The key to this is the journal_callback -struct, this maintains the internal callback information but you can -extend it like this:- -</para> -<programlisting> - struct myfs_callback_s { - //Data structure element required by jbd.. - struct journal_callback for_jbd; - // Stuff for myfs allocated together. - myfs_inode* i_commited; - - } -</programlisting> - -<para> -this would be useful if you needed to know when data was committed to a -particular inode. -</para> - </sect2> <sect2 id="jbd_summary">
@@ -319,36 +305,6 @@ being each mount, each modification (transaction) and each changed buffer to tell the journalling layer about them. </para> -<para> -Here is a some pseudo code to give you an idea of how it works, as -an example. -</para> - -<programlisting> - journal_t* my_jnrl = journal_create(); - journal_init_{dev,inode}(jnrl,...) - if (clean) journal_wipe(); - journal_load(); - - foreach(transaction) { /*transactions must be - completed before - a syscall returns to - userspace*/ - - handle_t * xct=journal_start(my_jnrl); - foreach(bh) { - journal_get_{create,write,undo}_access(xact,bh); - if ( myfs_modify(bh) ) { /* returns true - if makes changes */ - journal_dirty_{meta,}data(xact,bh); - } else { - journal_forget(bh); - } - } - journal_stop(xct); - } - journal_destroy(my_jrnl); -</programlisting> </sect2> </sect1>
@@ -357,13 +313,13 @@ an example. <title>Data Types</title> <para> The journalling layer uses typedefs to 'hide' the concrete definitions - of the structures used. As a client of the JBD layer you can + of the structures used. As a client of the JBD2 layer you can just rely on the using the pointer as a magic cookie of some sort. Obviously the hiding is not enforced as this is 'C'. </para> <sect2 id="structures"><title>Structures</title> -!Iinclude/linux/jbd.h +!Iinclude/linux/jbd2.h </sect2> </sect1>
@@ -375,11 +331,11 @@ an example. manage transactions </para> <sect2 id="journal_level"><title>Journal Level</title> -!Efs/jbd/journal.c -!Ifs/jbd/recovery.c +!Efs/jbd2/journal.c +!Ifs/jbd2/recovery.c </sect2> <sect2 id="transaction_level"><title>Transasction Level</title> -!Efs/jbd/transaction.c +!Efs/jbd2/transaction.c </sect2> </sect1> <sect1 id="see_also">
Signature · 1 line
2.1.4
Jan Kara
maintainerPATCH v2 2/4 fs: Remove ext3 filesystem driver
In reply to Jan KaraFrom: Jan Kara <[email protected]>
The functionality of ext3 is fully supported by ext4 driver. Major distributions (SUSE, RedHat) already use ext4 driver to handle ext3 filesystems for quite some time. There is some ugliness in mm resulting from jbd cleaning buffers in a dirty page without cleaning page dirty bit and also support for buffer bouncing in the block layer when stable pages are required is there only because of jbd. So let's remove the ext3 driver. This saves us some 28k lines of duplicated code.
--- Documentation/filesystems/ext2.txt | 4 +- Documentation/filesystems/ext3.txt | 209 +-- Documentation/filesystems/vfs.txt | 2 +- MAINTAINERS | 18 +- fs/Kconfig | 5 +- fs/Makefile | 2 - fs/ext3/Kconfig | 89 - fs/ext3/Makefile | 12 - fs/ext3/acl.c | 281 --- fs/ext3/acl.h | 72 - fs/ext3/balloc.c | 2158 ---------------------- fs/ext3/bitmap.c | 20 - fs/ext3/dir.c | 537 ------ fs/ext3/ext3.h | 1332 -------------- fs/ext3/ext3_jbd.c | 59 - fs/ext3/file.c | 79 - fs/ext3/fsync.c | 109 -- fs/ext3/hash.c | 206 --- fs/ext3/ialloc.c | 706 ------- fs/ext3/inode.c | 3574 ------------------------------------ fs/ext3/ioctl.c | 327 ---- fs/ext3/namei.c | 2586 -------------------------- fs/ext3/namei.h | 27 - fs/ext3/resize.c | 1117 ----------- fs/ext3/super.c | 3165 ------------------------------- fs/ext3/symlink.c | 46 - fs/ext3/xattr.c | 1330 -------------- fs/ext3/xattr.h | 136 -- fs/ext3/xattr_security.c | 78 - fs/ext3/xattr_trusted.c | 54 - fs/ext3/xattr_user.c | 58 - fs/ext4/Kconfig | 41 +- fs/ext4/super.c | 14 +- fs/jbd/Kconfig | 30 - fs/jbd/Makefile | 7 - fs/jbd/checkpoint.c | 782 -------- fs/jbd/commit.c | 1021 ---------- fs/jbd/journal.c | 2145 ---------------------- fs/jbd/recovery.c | 594 ------ fs/jbd/revoke.c | 733 -------- fs/jbd/transaction.c | 2237 ---------------------- include/linux/jbd.h | 1047 ----------- include/linux/jbd2.h | 41 +- include/linux/jbd_common.h | 46 - include/trace/events/ext3.h | 866 --------- include/trace/events/jbd.h | 194 -- 46 files changed, 87 insertions(+), 28109 deletions(-) delete mode 100644 fs/ext3/Kconfig delete mode 100644 fs/ext3/Makefile delete mode 100644 fs/ext3/acl.c delete mode 100644 fs/ext3/acl.h delete mode 100644 fs/ext3/balloc.c delete mode 100644 fs/ext3/bitmap.c delete mode 100644 fs/ext3/dir.c delete mode 100644 fs/ext3/ext3.h delete mode 100644 fs/ext3/ext3_jbd.c delete mode 100644 fs/ext3/file.c delete mode 100644 fs/ext3/fsync.c delete mode 100644 fs/ext3/hash.c delete mode 100644 fs/ext3/ialloc.c delete mode 100644 fs/ext3/inode.c delete mode 100644 fs/ext3/ioctl.c delete mode 100644 fs/ext3/namei.c delete mode 100644 fs/ext3/namei.h delete mode 100644 fs/ext3/resize.c delete mode 100644 fs/ext3/super.c delete mode 100644 fs/ext3/symlink.c delete mode 100644 fs/ext3/xattr.c delete mode 100644 fs/ext3/xattr.h delete mode 100644 fs/ext3/xattr_security.c delete mode 100644 fs/ext3/xattr_trusted.c delete mode 100644 fs/ext3/xattr_user.c delete mode 100644 fs/jbd/Kconfig delete mode 100644 fs/jbd/Makefile delete mode 100644 fs/jbd/checkpoint.c delete mode 100644 fs/jbd/commit.c delete mode 100644 fs/jbd/journal.c delete mode 100644 fs/jbd/recovery.c delete mode 100644 fs/jbd/revoke.c delete mode 100644 fs/jbd/transaction.c delete mode 100644 include/linux/jbd.h delete mode 100644 include/linux/jbd_common.h delete mode 100644 include/trace/events/ext3.h delete mode 100644 include/trace/events/jbd.h
Documentation/filesystems/ext2.txt +2 -2
@@ -360,8 +360,8 @@ and are copied into the filesystem. If a transaction is incomplete at the time of the crash, then there is no guarantee of consistency for the blocks in that transaction so they are discarded (which means any filesystem changes they represent are also lost). -Check Documentation/filesystems/ext3.txt if you want to read more about -ext3 and journaling. +Check Documentation/filesystems/ext4.txt if you want to read more about +ext4 and journaling. References ==========
Documentation/filesystems/ext3.txt +3 -206
213 lines not on this page · raw message
Documentation/filesystems/vfs.txt +1 -1
@@ -769,7 +769,7 @@ struct address_space_operations { to stall to allow flushers a chance to complete some IO. Ordinarily it can use PageDirty and PageWriteback but some filesystems have more complex state (unstable pages in NFS prevent reclaim) or - do not set those flags due to locking problems (jbd). This callback + do not set those flags due to locking problems. This callback allows a filesystem to indicate to the VM if a page should be treated as dirty or writeback for the purposes of stalling.
MAINTAINERS +1 -17
@@ -4058,15 +4058,6 @@ F: Documentation/filesystems/ext2.txt F: fs/ext2/ F: include/linux/ext2* -EXT3 FILE SYSTEM -M: Jan Kara <[email protected]> -M: Andrew Morton <[email protected]> -M: Andreas Dilger <[email protected]> -L: [email protected] -S: Maintained -F: Documentation/filesystems/ext3.txt -F: fs/ext3/ - EXT4 FILE SYSTEM M: "Theodore Ts'o" <[email protected]> M: Andreas Dilger <[email protected]>
@@ -5750,16 +5741,9 @@ S: Maintained F: fs/jffs2/ F: include/uapi/linux/jffs2.h -JOURNALLING LAYER FOR BLOCK DEVICES (JBD) -M: Andrew Morton <[email protected]> -M: Jan Kara <[email protected]> -L: [email protected] -S: Maintained -F: fs/jbd/ -F: include/linux/jbd.h - JOURNALLING LAYER FOR BLOCK DEVICES (JBD2) M: "Theodore Ts'o" <[email protected]> +M: Jan Kara <[email protected]> L: [email protected] S: Maintained F: fs/jbd2/
fs/Kconfig +1 -4
@@ -11,18 +11,15 @@ config DCACHE_WORD_ACCESS if BLOCK source "fs/ext2/Kconfig" -source "fs/ext3/Kconfig" source "fs/ext4/Kconfig" -source "fs/jbd/Kconfig" source "fs/jbd2/Kconfig" config FS_MBCACHE # Meta block cache for Extended Attributes (ext2/ext3/ext4) tristate default y if EXT2_FS=y && EXT2_FS_XATTR - default y if EXT3_FS=y && EXT3_FS_XATTR default y if EXT4_FS=y - default m if EXT2_FS_XATTR || EXT3_FS_XATTR || EXT4_FS + default m if EXT2_FS_XATTR || EXT4_FS source "fs/reiserfs/Kconfig" source "fs/jfs/Kconfig"
fs/Makefile +0 -2
@@ -62,12 +62,10 @@ obj-$(CONFIG_DLM) += dlm/ # Do not add any filesystems before this line obj-$(CONFIG_FSCACHE) += fscache/ obj-$(CONFIG_REISERFS_FS) += reiserfs/ -obj-$(CONFIG_EXT3_FS) += ext3/ # Before ext2 so root fs can be ext3 obj-$(CONFIG_EXT2_FS) += ext2/ # We place ext4 after ext2 so plain ext2 root fs's are mounted using ext2 # unless explicitly requested by rootfstype obj-$(CONFIG_EXT4_FS) += ext4/ -obj-$(CONFIG_JBD) += jbd/ obj-$(CONFIG_JBD2) += jbd2/ obj-$(CONFIG_CRAMFS) += cramfs/ obj-$(CONFIG_SQUASHFS) += squashfs/
fs/ext3/Kconfig deleted +0 -0
fs/ext3/Makefile deleted +0 -0
fs/ext3/acl.c deleted +0 -0
fs/ext3/acl.h deleted +0 -0
fs/ext3/balloc.c deleted +0 -0
fs/ext3/bitmap.c deleted +0 -0
fs/ext3/dir.c deleted +0 -0
fs/ext3/ext3.h deleted +0 -0
fs/ext3/ext3_jbd.c deleted +0 -0
fs/ext3/file.c deleted +0 -0
fs/ext3/fsync.c deleted +0 -0
fs/ext3/hash.c deleted +0 -0
fs/ext3/ialloc.c deleted +0 -0
fs/ext3/inode.c deleted +0 -0
fs/ext3/ioctl.c deleted +0 -0
fs/ext3/namei.c deleted +0 -0
fs/ext3/namei.h deleted +0 -0
fs/ext3/resize.c deleted +0 -0
fs/ext3/super.c deleted +0 -0
fs/ext3/symlink.c deleted +0 -0
fs/ext3/xattr.c deleted +0 -0
fs/ext3/xattr.h deleted +0 -0
fs/ext3/xattr_security.c deleted +0 -0
fs/ext3/xattr_trusted.c deleted +0 -0
fs/ext3/xattr_user.c deleted +0 -0
fs/ext4/Kconfig +37 -4
56 lines not on this page · raw message
fs/ext4/super.c +2 -12
@@ -84,7 +84,7 @@ static void ext4_unregister_li_request(struct super_block *sb);static void ext4_clear_request_list (void );static int ext4_reserve_clusters (struct ext4_sb_info *,ext4_fsblk_t ); -#if !defined(CONFIG_EXT2_FS ) && !defined(CONFIG_EXT2_FS_MODULE ) && defined(CONFIG_EXT4_USE_FOR_EXT23 ) +#if !defined(CONFIG_EXT2_FS ) && !defined(CONFIG_EXT2_FS_MODULE ) && defined(CONFIG_EXT4_USE_FOR_EXT2 )static struct file_system_type ext2_fs_type = { .owner =THIS_MODULE , .name = "ext2",
@@ -100,7 +100,6 @@ MODULE_ALIAS("ext2");#endif -#if !defined(CONFIG_EXT3_FS ) && !defined(CONFIG_EXT3_FS_MODULE ) && defined(CONFIG_EXT4_USE_FOR_EXT23 )static struct file_system_type ext3_fs_type = { .owner =THIS_MODULE , .name ="ext3" ,
@@ -111,9 +110,6 @@ static struct file_system_type ext3_fs_type = {MODULE_ALIAS_FS ("ext3" );MODULE_ALIAS ("ext3" );#define IS_EXT3_SB (sb) ((sb)->s_bdev->bd_holder == &ext3_fs_type) -#else -#define IS_EXT3_SB (sb) (0) -#endif static int ext4_verify_csum_type (struct super_block *sb,struct ext4_super_block *es)
@@ -5500,7 +5496,7 @@ static struct dentry *ext4_mount(struct file_system_type *fs_type, int flags,return mount_bdev (fs_type, flags, dev_name, data, ext4_fill_super); } -#if !defined(CONFIG_EXT2_FS ) && !defined(CONFIG_EXT2_FS_MODULE ) && defined(CONFIG_EXT4_USE_FOR_EXT23 ) +#if !defined(CONFIG_EXT2_FS ) && !defined(CONFIG_EXT2_FS_MODULE ) && defined(CONFIG_EXT4_USE_FOR_EXT2 )static inline void register_as_ext2 (void ) {int err =register_filesystem (&ext2_fs_type);
@@ -5530,7 +5526,6 @@ static inline void unregister_as_ext2(void) { }static inline int ext2_feature_set_ok (struct super_block *sb) {return 0 ; }#endif -#if !defined(CONFIG_EXT3_FS ) && !defined(CONFIG_EXT3_FS_MODULE ) && defined(CONFIG_EXT4_USE_FOR_EXT23 )static inline void register_as_ext3 (void ) {int err =register_filesystem (&ext3_fs_type);
@@ -5556,11 +5551,6 @@ static inline int ext3_feature_set_ok(struct super_block *sb)return 0 ;return 1 ; } -#else -static inline void register_as_ext3 (void ) { } -static inline void unregister_as_ext3 (void ) { } -static inline int ext3_feature_set_ok (struct super_block *sb) {return 0 ; } -#endif static struct file_system_type ext4_fs_type = { .owner =THIS_MODULE ,
fs/jbd/Kconfig deleted +0 -0
fs/jbd/Makefile deleted +0 -0
fs/jbd/checkpoint.c deleted +0 -0
fs/jbd/commit.c deleted +0 -0
fs/jbd/journal.c deleted +0 -0
fs/jbd/recovery.c deleted +0 -0
fs/jbd/revoke.c deleted +0 -0
fs/jbd/transaction.c deleted +0 -0
include/linux/jbd.h deleted +0 -0
include/linux/jbd2.h +40 -1
53 lines not on this page · raw message
include/linux/jbd_common.h deleted +0 -0
include/trace/events/ext3.h deleted +0 -0
include/trace/events/jbd.h deleted +0 -0
Signature · 1 line
2.1.4
Jan Kara
maintainerPATCH v2 3/4 block: Remove forced page bouncing under IO
In reply to Jan KaraFrom: Jan Kara <[email protected]>
JBD layer wrote back data buffers without setting PageWriteback bit. Thus standard mechanism for guaranteeing stable pages under IO did not work. Since JBD is gone now and there is no other user of the functionality, just remove it.
--- block/bounce.c | 31 ++++--------------------------- include/linux/blk_types.h | 5 ++--- 2 files changed, 6 insertions(+), 30 deletions(-)
block/bounce.c +4 -27
@@ -176,26 +176,8 @@ static void bounce_end_io_read_isa(struct bio *bio, int err)__bounce_end_io_read (bio, isa_page_pool, err); } -#ifdef CONFIG_NEED_BOUNCE_POOL -static int must_snapshot_stable_pages (struct request_queue *q,struct bio *bio) -{ -if (bio_data_dir (bio) !=WRITE ) -return 0 ; - -if (!bdi_cap_stable_pages_required (&q->backing_dev_info)) -return 0 ; - -return test_bit (BIO_SNAP_STABLE , &bio->bi_flags); -} -#else -static int must_snapshot_stable_pages (struct request_queue *q,struct bio *bio) -{ -return 0 ; -} -#endif /* CONFIG_NEED_BOUNCE_POOL */ -static void __blk_queue_bounce (struct request_queue *q,struct bio **bio_orig, -mempool_t *pool,int force) +mempool_t *pool) {struct bio *bio;int rw =bio_data_dir (*bio_orig);
@@ -203,8 +185,6 @@ static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig,struct bvec_iter iter;unsigned i; -if (force) - goto bounce;bio_for_each_segment (from, *bio_orig, iter)if (page_to_pfn (from.bv_page) >queue_bounce_pfn (q)) goto bounce;
@@ -216,7 +196,7 @@ bounce:bio_for_each_segment_all (to, bio, i) {struct page *page = to->bv_page; -if (page_to_pfn (page) <=queue_bounce_pfn (q) && !force) +if (page_to_pfn (page) <=queue_bounce_pfn (q))continue ; to->bv_page =mempool_alloc (pool, q->bounce_gfp);
@@ -254,7 +234,6 @@ bounce:void blk_queue_bounce (struct request_queue *q,struct bio **bio_orig) { -int must_bounce;mempool_t *pool;/*
@@ -263,15 +242,13 @@ void blk_queue_bounce(struct request_queue *q, struct bio **bio_orig)if (!bio_has_data (*bio_orig))return ; - must_bounce =must_snapshot_stable_pages (q, *bio_orig); -/* * for non-isa bounce case, just check if the bounce pfn is equal * to or bigger than the highest pfn in the system -- in that case, * don't waste time iterating over bio segments */ if (!(q->bounce_gfp &GFP_DMA )) { -if (queue_bounce_pfn (q) >= blk_max_pfn && !must_bounce) +if (queue_bounce_pfn (q) >= blk_max_pfn)return ; pool = page_pool; }else {
@@ -282,7 +259,7 @@ void blk_queue_bounce(struct request_queue *q, struct bio **bio_orig)/* * slow path */ -__blk_queue_bounce (q, bio_orig, pool, must_bounce); +__blk_queue_bounce (q, bio_orig, pool); }EXPORT_SYMBOL (blk_queue_bounce);
include/linux/blk_types.h +2 -3
@@ -118,9 +118,8 @@ struct bio {#define BIO_USER_MAPPED 4/* contains user pages */ #define BIO_NULL_MAPPED 5/* contains invalid user pages */ #define BIO_QUIET 6/* Make BIO Quiet */ -#define BIO_SNAP_STABLE 7/* bio data must be snapshotted during write */ -#define BIO_CHAIN 8/* chained bio, ->bi_remaining in effect */ -#define BIO_REFFED 9/* bio has elevated ->bi_cnt */ +#define BIO_CHAIN 7/* chained bio, ->bi_remaining in effect */ +#define BIO_REFFED 8/* bio has elevated ->bi_cnt */ /* * Flags starting here get preserved by bio_reset() - this includes
Signature · 1 line
2.1.4
Jan Kara
maintainerPATCH v2 4/4 ext4: Improve ext4 Kconfig test
In reply to Jan KaraNow that ext4 driver must be used to access ext3 filesystems, improve the Kconfig help text to better explain that using ext4 driver to access the filesystem is fully compatible with the old ext3 driver.
--- fs/ext4/Kconfig | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
fs/ext4/Kconfig +7 -6
@@ -49,12 +49,13 @@ config EXT4_FS up fsck time. For more information, please see the web pages at http://ext4.wiki.kernel.org. - The ext4 filesystem will support mounting an ext3 - filesystem; while there will be some performance gains from - the delayed allocation and inode table readahead, the best - performance gains will require enabling ext4 features in the - filesystem, or formatting a new filesystem as an ext4 - filesystem initially. + The ext4 filesystem supports mounting an ext3 filesystem; while there + are some performance gains from the delayed allocation and inode + table readahead, the best performance gains require enabling ext4 + features in the filesystem using tune2fs, or formatting a new + filesystem as an ext4 filesystem initially. Without explicit enabling + of ext4 features, the on disk filesystem format stays fully backward + compatible. To compile this file system support as a module, choose M here. The module will be called ext4.
Signature · 1 line
2.1.4
Re: [PATCH 4/4] ext4: Improve ext4 Kconfig test
Quoted 5 lines · Jan Kara
Now that ext4 driver must be used to access ext3 filesystems, improve the
Kconfighelp text to better explain that using ext4 driver to access the filesystem is fully compatible with the old ext3 driver.Signed-off-by Jan Kara <[email protected]>
- Ted