This is a note to let you know that I've just added the patch titled

    ext4: flush the extent status cache during EXT4_IOC_SWAP_BOOT

to the 3.10-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ext4-flush-the-extent-status-cache-during-ext4_ioc_swap_boot.patch
and it can be found in the queue-3.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From cde2d7a796f7e895e25b43471ed658079345636d Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <[email protected]>
Date: Mon, 12 Aug 2013 09:29:30 -0400
Subject: ext4: flush the extent status cache during EXT4_IOC_SWAP_BOOT

From: Theodore Ts'o <[email protected]>

commit cde2d7a796f7e895e25b43471ed658079345636d upstream.

Previously we weren't swapping only some of the extent_status LRU
fields during the processing of the EXT4_IOC_SWAP_BOOT ioctl.  The
much safer thing to do is to just completely flush the extent status
tree when doing the swap.

Signed-off-by: "Theodore Ts'o" <[email protected]>
Cc: Zheng Liu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 fs/ext4/ioctl.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -77,8 +77,10 @@ static void swap_inode_data(struct inode
        memswap(ei1->i_data, ei2->i_data, sizeof(ei1->i_data));
        memswap(&ei1->i_flags, &ei2->i_flags, sizeof(ei1->i_flags));
        memswap(&ei1->i_disksize, &ei2->i_disksize, sizeof(ei1->i_disksize));
-       memswap(&ei1->i_es_tree, &ei2->i_es_tree, sizeof(ei1->i_es_tree));
-       memswap(&ei1->i_es_lru_nr, &ei2->i_es_lru_nr, sizeof(ei1->i_es_lru_nr));
+       ext4_es_remove_extent(inode1, 0, EXT_MAX_BLOCKS);
+       ext4_es_remove_extent(inode2, 0, EXT_MAX_BLOCKS);
+       ext4_es_lru_del(inode1);
+       ext4_es_lru_del(inode2);
 
        isize = i_size_read(inode1);
        i_size_write(inode1, i_size_read(inode2));


Patches currently in stable-queue which might be from [email protected] are

queue-3.10/ext4-flush-the-extent-status-cache-during-ext4_ioc_swap_boot.patch
queue-3.10/ext4-fix-retry-handling-in-ext4_ext_truncate.patch
queue-3.10/ext4-allow-the-mount-options-nodelalloc-and-data-journal.patch
queue-3.10/ext4-fix-mount-remount-error-messages-for-incompatible-mount-options.patch
queue-3.10/ext4-make-sure-group-number-is-bumped-after-a-inode-allocation-race.patch
queue-3.10/ext4-destroy-ext4_es_cachep-on-module-unload.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to