[f2fs-dev] [PATCH] f2fs: avoid hungtask problem caused by f2fs_balance_fs

2016-02-25 Thread Yunlei He
I came across a hungtask problem as below: INFO: task 962 blocked for more than 120 s. Call trace: [] __switch_to+0x74/0x8c [] __schedule+0x3b4/0x8f4 [] schedule+0x24/0x68 [] schedule_preempt_disabled+0x10/0x24 [] __mutex_lock_slowpath+0x154/0x26c [] mutex_lock+0x44/0x64 []

[f2fs-dev] [RFC PATCH] fsck.f2fs: check valid values for dot dentries

2016-02-25 Thread Liu Xue
Check valid values for '.' and '..', such as ino, hash_code, and the number of dot or dotdot in the directory. Signed-off-by: Xue Liu Signed-off-by: Yong Sheng --- fsck/fsck.c | 78 -

[f2fs-dev] [RFC PATCH] f2fs: recovery missing dot dentries in root directory

2016-02-25 Thread Liu Xue
If f2fs was corrupted with missing dot dentries in root dirctory, it needs to recover them after fsck.f2fs set F2FS_INLINE_DOTS flag in directory inode when fsck.f2fs detects missing dot dentries. Signed-off-by: Xue Liu Signed-off-by: Yong Sheng

[f2fs-dev] [PATCH] common/attr: add maximum acl count for f2fs

2016-02-25 Thread Chao Yu
Add a max acl count into common/attr for f2fs in order to make f2fs passing generic/026 test case. Signed-off-by: Chao Yu --- common/attr | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/attr b/common/attr index 86fe181..0efc26d 100644 --- a/common/attr +++

[f2fs-dev] [PATCH v2 1/2] f2fs: fix to avoid deadlock when merging inline data

2016-02-25 Thread Chao Yu
When testing with fsstress, kworker and user threads were both blocked: INFO: task kworker/u16:1:16580 blocked for more than 120 seconds. "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. kworker/u16:1 D 8803f2595390 0 16580 2 0x Workqueue: writeback

Re: [f2fs-dev] [PATCH] f2fs: avoid hungtask problem caused by losing wake_up

2016-02-25 Thread Chao Yu
Hi Jaegeuk, > -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent: Friday, February 26, 2016 3:03 AM > To: Chao Yu > Cc: 'He YunLei'; linux-f2fs-devel@lists.sourceforge.net; > bintian.w...@huawei.com; 'Biao He' > Subject: Re: [f2fs-dev] [PATCH] f2fs: avoid hungtask

[f2fs-dev] [PATCH 07/10] fs crypto: add dentry revalidation facility in crypto

2016-02-25 Thread Jaegeuk Kim
This patch is to support the following ext4 crypto change. commit 28b4c263961c47da84ed8b5be0b5116bad1133eb Author: Theodore Ts'o Date: Sun Feb 7 19:35:05 2016 -0500 ext4 crypto: revalidate dentry after adding or removing the key Cc: Theodore Ts'o Cc: Al

[f2fs-dev] [PATCH 06/10] fs crypto: add Makefile and Kconfig

2016-02-25 Thread Jaegeuk Kim
This patch adds a facility to enable per-file encryption. Arnd fixes a missing CONFIG_BLOCK check in the original patch. "The newly added generic crypto abstraction for file systems operates on 'struct bio' objects, which do not exist when CONFIG_BLOCK is disabled: fs/crypto/crypto.c: In

[f2fs-dev] [PATCH 09/10] f2fs crypto: sync ext4_lookup and ext4_file_open

2016-02-25 Thread Jaegeuk Kim
This patch tries to catch up with lookup and open policies in ext4. Signed-off-by: Jaegeuk Kim --- fs/f2fs/dir.c | 2 +- fs/f2fs/file.c | 4 fs/f2fs/namei.c | 23 +++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/dir.c

[f2fs-dev] [PATCH 05/10] fs crypto: add fname.c to support filename encryption

2016-02-25 Thread Jaegeuk Kim
This patch adds fname.c supporting filename encryption. 1. general wrapper functions - fscrypt_fname_disk_to_usr - fscrypt_fname_usr_to_disk - fscrypt_setup_filename - fscrypt_free_filename 2. specific filename handling functions - fscrypt_fname_alloc_buffer - fscrypt_fname_free_buffer

[f2fs-dev] [PATCH 08/10] f2fs crypto: migrate into vfs's crypto engine

2016-02-25 Thread Jaegeuk Kim
This patch removes the most parts of internal crypto codes. And then, it modifies some f2fs-specific crypt codes to use the generic facility. Signed-off-by: Jaegeuk Kim --- fs/f2fs/Kconfig | 10 +- fs/f2fs/Makefile| 2 - fs/f2fs/crypto.c| 473

[f2fs-dev] [PATCH 04/10] fs crypto: add keyinfo.c to handle permissions

2016-02-25 Thread Jaegeuk Kim
This patch adds keyinfo.c supporting key management. - fscrypt_get_encryption_info - fscrypt_free_encryption_info Signed-off-by: Michael Halcrow Signed-off-by: Ildar Muslukhov Signed-off-by: Theodore Ts'o Signed-off-by: Jaegeuk Kim

[f2fs-dev] [PATCH 10/10] ext4 crypto: migrate into vfs's crypto engine

2016-02-25 Thread Jaegeuk Kim
This patch removes the most parts of internal crypto codes. And then, it modifies and adds some ext4-specific crypt codes to use the generic facility. Signed-off-by: Jaegeuk Kim --- fs/ext4/Kconfig | 12 +- fs/ext4/Makefile| 2 - fs/ext4/crypto.c|

[f2fs-dev] [PATCH 03/10] fs crypto: add policy.c to handle contexts

2016-02-25 Thread Jaegeuk Kim
This patch adds policy.c supporting context management. 1. For ioctls: - fscrypt_process_policy - fscrypt_get_policy 2. For context permission - fscrypt_has_permitted_context - fscrypt_inherit_context Signed-off-by: Michael Halcrow Signed-off-by: Theodore Ts'o

[f2fs-dev] [PATCH 01/10] fs crypto: add basic definitions for per-file encryption

2016-02-25 Thread Jaegeuk Kim
This patch adds definitions for per-file encryption used by ext4 and f2fs. Signed-off-by: Jaegeuk Kim --- include/linux/fs.h | 8 ++ include/linux/fscrypto.h | 239 +++ include/uapi/linux/fs.h | 18 3 files changed,

[f2fs-dev] [PATCH 00/10 v2] File-level Encryption Support by VFS

2016-02-25 Thread Jaegeuk Kim
This patch series migrates the existing ext4 and f2fs per-file encryption feature into VFS layer. Due to the upcoming merge window, let me consider the following schedule. 1. migrate f2fs and there-in crypto codes into VFS during the next merge window 2. settle down new crypto lib in VFS during

[f2fs-dev] [PATCH 02/10] fs crypto: add crypto.c for encrypt/decrypt functions

2016-02-25 Thread Jaegeuk Kim
This patch adds crypto.c supporting encrypting and decrypting functions. 1. IO preparation: - fscrypt_get_ctx / fscrypt_release_ctx 2. before IOs: - fscrypt_encrypt_page - fscrypt_decrypt_page - fscrypt_zeroout_range 3. after IOs: - fscrypt_decrypt_bio_pages -

Re: [f2fs-dev] [PATCH] f2fs: avoid hungtask problem caused by losing wake_up

2016-02-25 Thread Jaegeuk Kim
Hi all, On Thu, Feb 25, 2016 at 05:41:26PM +0800, Chao Yu wrote: > Hi Yunlei, > > > -Original Message- > > From: He YunLei [mailto:heyun...@huawei.com] > > Sent: Thursday, February 25, 2016 3:36 PM > > To: Chao Yu; jaeg...@kernel.org; linux-f2fs-devel@lists.sourceforge.net > > Cc:

[f2fs-dev] [PATCH 2/2] f2fs: update inode page under cp_rwsem lock

2016-02-25 Thread Chao Yu
We should update inode page under protection of cp_rwsem lock, otherwise new dirty inode pages will generated by ->fsync or ->write_inode during checkpoint, which should not be allowed. Signed-off-by: Chao Yu --- fs/f2fs/inode.c | 7 ++- 1 file changed, 6

[f2fs-dev] [PATCH 1/2] f2fs: fix to avoid deadlock when merging inline data

2016-02-25 Thread Chao Yu
When testing with fsstress, kworker and user threads were both blocked: INFO: task kworker/u16:1:16580 blocked for more than 120 seconds. "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. kworker/u16:1 D 8803f2595390 0 16580 2 0x Workqueue: writeback

Re: [f2fs-dev] [PATCH] f2fs: avoid hungtask problem caused by losing wake_up

2016-02-25 Thread Chao Yu
Hi Yunlei, > -Original Message- > From: He YunLei [mailto:heyun...@huawei.com] > Sent: Thursday, February 25, 2016 3:36 PM > To: Chao Yu; jaeg...@kernel.org; linux-f2fs-devel@lists.sourceforge.net > Cc: bintian.w...@huawei.com; 'Biao He' > Subject: Re: [f2fs-dev] [PATCH] f2fs: avoid

Re: [f2fs-dev] [PATCH] f2fs: avoid hungtask problem caused by losing wake_up

2016-02-25 Thread Chao Yu
Hi Hebiao, > -Original Message- > From: hebiao (G) [mailto:hebi...@huawei.com] > Sent: Wednesday, February 24, 2016 5:46 PM > To: Chao Yu; heyunlei; jaeg...@kernel.org; > linux-f2fs-devel@lists.sourceforge.net > Cc: Wangbintian > Subject: RE: [f2fs-dev] [PATCH] f2fs: avoid hungtask