[Btrfs-devel] subvol=. bug
Yan Zheng
yanzheng at 21cn.com
Mon Feb 18 20:38:04 PST 2008
2008/2/19, Pär Andersson <paran at lysator.liu.se>:
> Hi,
>
> First I will mention that I am still running btrfs on / without any
> big problems. :-)
>
> However I have found another bug. If I have at least one snapshot
> other than default, and mount using "-o subvol=." then readdir on that
> directory keeps returning the same entry over and over. This is with latest
> btrfs-unstable, linux 2.6.24.2 on i686.
Patch attached below can fix this.
Regards
YZ
---
diff -r 1cc5025e42bb inode.c
--- a/inode.c Fri Feb 15 13:19:35 2008 -0500
+++ b/inode.c Tue Feb 19 12:32:55 2008 +0800
@@ -1465,7 +1465,8 @@ read_dir_items:
di = (struct btrfs_dir_item *)((char *)di + di_len);
}
}
- filp->f_pos = INT_LIMIT(typeof(filp->f_pos));
+ if (key_type == BTRFS_DIR_INDEX_KEY)
+ filp->f_pos = INT_LIMIT(typeof(filp->f_pos));
nopos:
ret = 0;
err:
More information about the Btrfs-devel
mailing list