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

    Btrfs: skip subvol entries when checking if we've created a dir already

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:
     
btrfs-skip-subvol-entries-when-checking-if-we-ve-created-a-dir-already.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 a05254143cd183b18002cbba7759a1e4629aa762 Mon Sep 17 00:00:00 2001
From: Josef Bacik <[email protected]>
Date: Mon, 12 Aug 2013 10:56:14 -0400
Subject: Btrfs: skip subvol entries when checking if we've created a dir already

From: Josef Bacik <[email protected]>

commit a05254143cd183b18002cbba7759a1e4629aa762 upstream.

We have logic to see if we've already created a parent directory by check to see
if an inode inside of that directory has a lower inode number than the one we
are currently processing.  The logic is that if there is a lower inode number
then we would have had to made sure the directory was created at that previous
point.  The problem is that subvols inode numbers count from the lowest objectid
in the root tree, which may be less than our current progress.  So just skip if
our dir item key is a root item.  This fixes the original test and the xfstest
version I made that added an extra subvol create.  Thanks,

Reported-by: Emil Karlson <[email protected]>
Signed-off-by: Josef Bacik <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 fs/btrfs/send.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -2524,7 +2524,8 @@ static int did_create_dir(struct send_ct
                di = btrfs_item_ptr(eb, slot, struct btrfs_dir_item);
                btrfs_dir_item_key_to_cpu(eb, di, &di_key);
 
-               if (di_key.objectid < sctx->send_progress) {
+               if (di_key.type != BTRFS_ROOT_ITEM_KEY &&
+                   di_key.objectid < sctx->send_progress) {
                        ret = 1;
                        goto out;
                }


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

queue-3.10/btrfs-remove-ourselves-from-the-cluster-list-under-lock.patch
queue-3.10/btrfs-skip-subvol-entries-when-checking-if-we-ve-created-a-dir-already.patch
queue-3.10/btrfs-change-how-we-queue-blocks-for-backref-checking.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