Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1334298
| From | Chao Yu <chao2.yu@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [f2fs-dev] [PATCH 5/7] f2fs crypto: set up encryption info for new inodes in f2fs_inherit_context() |
| Date | 2016-02-15 10:10 +0100 |
| Message-ID | <r2nkm-7he-15@gated-at.bofh.it> (permalink) |
| References | <r22zg-1xN-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Jaegeuk,
Please ignore this patch because it incurs deadlock as below:
bit_wait_io+0x1f/0x60
__wait_on_bit_lock+0x5c/0xb0
__lock_page+0xba/0xd0
pagecache_get_page+0x187/0x230
__get_node_page+0x7d/0x200 [f2fs]
get_node_page+0x12/0x20 [f2fs]
read_all_xattrs+0x213/0x330 [f2fs]
f2fs_getxattr+0x86/0x140 [f2fs]
_f2fs_get_encryption_info+0xb4/0x4d0 [f2fs]
f2fs_inherit_context+0xf8/0x100 [f2fs]
init_inode_metadata+0xb3/0x410 [f2fs]
__f2fs_add_link+0x2e1/0x650 [f2fs]
f2fs_mkdir+0xdb/0x180 [f2fs]
vfs_mkdir+0xe5/0x160
SyS_mkdirat+0xb8/0xf0
SyS_mkdir+0x19/0x20
entry_SYSCALL_64_fastpath+0x12/0x6f
Thanks,
> -----Original Message-----
> From: Chao Yu [mailto:chao2.yu@samsung.com]
> Sent: Sunday, February 14, 2016 6:56 PM
> To: Jaegeuk Kim
> Cc: tytso@mit.edu; linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net
> Subject: [f2fs-dev] [PATCH 5/7] f2fs crypto: set up encryption info for new inodes in
> f2fs_inherit_context()
>
> This patch syncs f2fs with commit 555570295532 ("ext4 crypto: set up
> encryption info for new inodes in ext4_inherit_context()") from ext4.
>
> Set up the encryption information for newly created inodes immediately
> after they inherit their encryption context from their parent
> directories.
>
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> Signed-off-by: Chao Yu <chao2.yu@samsung.com>
> ---
> fs/f2fs/crypto_policy.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/crypto_policy.c b/fs/f2fs/crypto_policy.c
> index d4a96af..0fb08b0 100644
> --- a/fs/f2fs/crypto_policy.c
> +++ b/fs/f2fs/crypto_policy.c
> @@ -203,7 +203,10 @@ int f2fs_inherit_context(struct inode *parent, struct inode *child,
> F2FS_KEY_DESCRIPTOR_SIZE);
>
> get_random_bytes(ctx.nonce, F2FS_KEY_DERIVATION_NONCE_SIZE);
> - return f2fs_setxattr(child, F2FS_XATTR_INDEX_ENCRYPTION,
> + res = f2fs_setxattr(child, F2FS_XATTR_INDEX_ENCRYPTION,
> F2FS_XATTR_NAME_ENCRYPTION_CONTEXT, &ctx,
> sizeof(ctx), ipage, XATTR_CREATE);
> + if (!res)
> + res = f2fs_get_encryption_info(child);
> + return res;
> }
> --
> 2.7.0.2.g1b0b6dd
>
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 5/7] f2fs crypto: set up encryption info for new inodes in f2fs_inherit_context() Chao Yu <chao2.yu@samsung.com> - 2016-02-14 12:00 +0100 RE: [f2fs-dev] [PATCH 5/7] f2fs crypto: set up encryption info for new inodes in f2fs_inherit_context() Chao Yu <chao2.yu@samsung.com> - 2016-02-15 10:10 +0100
csiph-web