eCryptfs wasn't setting s_blocksize in it's superblock; just pick
it up from the lower FS. Having an s_blocksize of 0 made things
like "filefrag" which call FIGETBSZ unhappy.
Signed-off-by: Eric Sandeen <[email protected]>
---
Index: linux-2.6.24-rc3/fs/ecryptfs/main.c
===================================================================
--- linux-2.6.24-rc3.orig/fs/ecryptfs/main.c
+++ linux-2.6.24-rc3/fs/ecryptfs/main.c
@@ -523,6 +523,7 @@ static int ecryptfs_read_super(struct su
lower_mnt = nd.mnt;
ecryptfs_set_superblock_lower(sb, lower_root->d_sb);
sb->s_maxbytes = lower_root->d_sb->s_maxbytes;
+ sb->s_blocksize = lower_root->d_sb->s_blocksize;
ecryptfs_set_dentry_lower(sb->s_root, lower_root);
ecryptfs_set_dentry_lower_mnt(sb->s_root, lower_mnt);
rc = ecryptfs_interpose(lower_root, sb->s_root, sb, 0);
On Fri, Dec 14, 2007 at 09:30:26AM -0600, Eric Sandeen wrote:
> eCryptfs wasn't setting s_blocksize in it's superblock; just pick
> it up from the lower FS. Having an s_blocksize of 0 made things
> like "filefrag" which call FIGETBSZ unhappy.
>
> Signed-off-by: Eric Sandeen <[email protected]>
Acked-by: Mike Halcrow <[email protected]>
>
> ---
>
> Index: linux-2.6.24-rc3/fs/ecryptfs/main.c
> ===================================================================
> --- linux-2.6.24-rc3.orig/fs/ecryptfs/main.c
> +++ linux-2.6.24-rc3/fs/ecryptfs/main.c
> @@ -523,6 +523,7 @@ static int ecryptfs_read_super(struct su
> lower_mnt = nd.mnt;
> ecryptfs_set_superblock_lower(sb, lower_root->d_sb);
> sb->s_maxbytes = lower_root->d_sb->s_maxbytes;
> + sb->s_blocksize = lower_root->d_sb->s_blocksize;
> ecryptfs_set_dentry_lower(sb->s_root, lower_root);
> ecryptfs_set_dentry_lower_mnt(sb->s_root, lower_mnt);
> rc = ecryptfs_interpose(lower_root, sb->s_root, sb, 0);
>