search for: btrfs_empty_dir_size

Displaying 4 results from an estimated 4 matches for "btrfs_empty_dir_size".

2012 Sep 13
0
[PATCH] btrfs: return EPERM upon rmdir on a subvolume
...f --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index a4167ef..a67dadd 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3815,9 +3815,10 @@ static int btrfs_rmdir(struct inode *dir, struct dentry *dentry) struct btrfs_trans_handle *trans; unsigned long nr = 0; - if (inode->i_size > BTRFS_EMPTY_DIR_SIZE || - btrfs_ino(inode) == BTRFS_FIRST_FREE_OBJECTID) + if (inode->i_size > BTRFS_EMPTY_DIR_SIZE) return -ENOTEMPTY; + if (btrfs_ino(inode) == BTRFS_FIRST_FREE_OBJECTID) + return -EPERM; trans = __unlink_start_trans(dir, dentry); if (IS_ERR(trans)) -- 1.7.9 -- To unsubscribe fro...
2010 Apr 08
2
ENOTEMPTY on "rm -rf" for snapshot and subvolume
...data. Now that after creating the snapshot i have tried deleting the same snapshot. But i am getting ENOTEMPTY for "rmdir". But when i see the actual files inside are deleted not the parent directory. From the code it looks like if (inode->i_size > BTRFS_EMPTY_DIR_SIZE || inode->i_ino == BTRFS_FIRST_FREE_OBJECTID) return -ENOTEMPTY; Why would "unlink" succeeds for the files inside the directory?, yet returning ENOTEMPTY This looks odd after this, i went ahead and tried deleting the the existing volume it...
2010 Aug 13
1
[PATCH] btrfs: avoid duplications by moving the static int array from header to c file
...-git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index e9bf864..99220ee 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -132,8 +132,6 @@ struct btrfs_ordered_sum; /* csum types */ #define BTRFS_CSUM_TYPE_CRC32 0 -static int btrfs_csum_sizes[] = { 4, 0 }; - /* four bytes for CRC32 */ #define BTRFS_EMPTY_DIR_SIZE 0 @@ -1877,12 +1875,7 @@ BTRFS_SETGET_STACK_FUNCS(super_incompat_flags, struct btrfs_super_block, BTRFS_SETGET_STACK_FUNCS(super_csum_type, struct btrfs_super_block, csum_type, 16); -static inline int btrfs_super_csum_size(struct btrfs_super_block *s) -{ - int t = btrfs_super_csum_type(s)...
2012 Mar 20
13
[PATCH 0 of 3 v2] PV-GRUB: add support for ext4 and btrfs
Hi, The following patches add support for ext4 and btrfs to PV-GRUB. These patches are taken nearly verbatim from those provided by Fedora and Gentoo. We''ve been using these patches for the PV-GRUB images available in EC2 for some time now with no problems. Changes from v1: - Makefile has been changed to check the exit code from patch - The btrfs patch has been rebased to apply