[f2fs-dev] [PATCH] f2fs: avoid duplicated permission check for "trusted." xattrs

2018-07-18 Thread Hyunchul Lee
From: Hyunchul Lee Because xattr_permission already checks CAP_SYS_ADMIN capability, we don't need to check it. Signed-off-by: Hyunchul Lee --- fs/f2fs/xattr.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index 708271871f94..4b34244dcc69 1

[f2fs-dev] [PATCH v3] f2fs: add nowait aio support

2018-03-08 Thread Hyunchul Lee
From: Hyunchul Lee This patch adds nowait aio support[1]. Return EAGAIN if any of the following checks fail for direct I/O: - i_rwsem is not lockable - Blocks are not allocated at the write location And xfstests generic/471 is passed. [1]: 6be96d "Introduce RWF_NOWAI

[f2fs-dev] [PATCH v2] f2fs: add nowait aio support

2018-03-08 Thread Hyunchul Lee
From: Hyunchul Lee This patch adds nowait aio support[1]. Return EAGAIN if any of the following checks fail for direct I/O: - i_rwsem is not lockable - Blocks are not allocated at the write location And xfstests generic/471 is passed. [1]: 6be96d "Introduce RWF_NOWAI

[f2fs-dev] [PATCH v2 1/3] f2fs: support passing down write hints given by users to block layer

2018-01-30 Thread Hyunchul Lee
From: Hyunchul Lee Add the 'whint_mode' mount option that controls which write hints are passed down to block layer. There are "off" and "user-based" mode. The default mode is "off". 1) whint_mode=off. F2FS only passes down WRITE_LIFE_NOT_SET. 2) whint_

[f2fs-dev] [PATCH v2 2/3] f2fs: support passing down write hints to block layer with F2FS policy

2018-01-30 Thread Hyunchul Lee
From: Hyunchul Lee Add 'whint_mode=fs-based' mount option. In this mode, F2FS passes down write hints with its policy. * whint_mode=fs-based. F2FS passes down hints with its policy. User F2FS

[f2fs-dev] [PATCH v2 3/3] f2fs: Add the 'whint_mode' mount option to f2fs documentation

2018-01-30 Thread Hyunchul Lee
From: Hyunchul Lee Signed-off-by: Hyunchul Lee --- Documentation/filesystems/f2fs.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt index 13c2ff0..414a160 100644 --- a/Documentation/filesystems/f2fs.txt +++ b

[f2fs-dev] [PATCH v2 0/3] f2fs: support passing down write hints to block layer

2018-01-30 Thread Hyunchul Lee
From: Hyunchul Lee Changes since version 1: - Set 'whint_mode' to off if 'active_logs' is two or four - Minor fixes suggested by Chao This set implements passing down write hints to block layer with the following mapping. This mapping equals the conclusion from discussio

Re: [f2fs-dev] [PATCH 1/3] f2fs: support passing down write hints given by users to block layer

2018-01-28 Thread Hyunchul Lee
On 01/26/2018 11:10 AM, Chao Yu wrote: > On 2018/1/26 7:46, Hyunchul Lee wrote: >> On 01/25/2018 05:01 PM, Chao Yu wrote: >>> Hi Hyunchul, >>> >>> On 2018/1/25 10:47, Hyunchul Lee wrote: >>>> Hi Chao, >>>> >>>> On 01/25/20

Re: [f2fs-dev] [PATCH 1/3] f2fs: support passing down write hints given by users to block layer

2018-01-25 Thread Hyunchul Lee
On 01/25/2018 05:01 PM, Chao Yu wrote: > Hi Hyunchul, > > On 2018/1/25 10:47, Hyunchul Lee wrote: >> Hi Chao, >> >> On 01/25/2018 12:32 AM, Chao Yu wrote: >>> On 2018/1/22 18:49, Hyunchul Lee wrote: >>>> From: Hyunchul Lee >>>> >

Re: [f2fs-dev] [PATCH 1/3] f2fs: support passing down write hints given by users to block layer

2018-01-24 Thread Hyunchul Lee
Hi Chao, On 01/25/2018 12:32 AM, Chao Yu wrote: > On 2018/1/22 18:49, Hyunchul Lee wrote: >> From: Hyunchul Lee >> >> Add the 'whint_mode' mount option that controls which write >> hints are passed down to block layer. There are "off" and >>

[f2fs-dev] [PATCH 0/3] f2fs: support passing down write hints to block layer

2018-01-22 Thread Hyunchul Lee
From: Hyunchul Lee This set implements passing down write hints to block layer with the following mapping. This mapping equals the conclusion from discussion in the link, https://sourceforge.net/p/linux-f2fs/mailman/message/36170969/ But there are two exceptions. (1) the 'iohint_mode&#

[f2fs-dev] [PATCH 1/3] f2fs: support passing down write hints given by users to block layer

2018-01-22 Thread Hyunchul Lee
From: Hyunchul Lee Add the 'whint_mode' mount option that controls which write hints are passed down to block layer. There are "off" and "user-based" mode. The default mode is "off". 1) whint_mode=user-based. F2FS tries to pass down hints giv

[f2fs-dev] [PATCH 2/3] f2fs: support passing down write hints to block layer with F2FS policy

2018-01-22 Thread Hyunchul Lee
From: Hyunchul Lee Add 'whint_mode=fs-based' mount option. In this mode, F2FS passes down write hints with its policy. * whint_mode=fs-based. F2FS passes down hints with its policy. User F2FS

[f2fs-dev] [PATCH 3/3] f2fs: Add the 'whint_mode' mount option to f2fs documentation

2018-01-22 Thread Hyunchul Lee
From: Hyunchul Lee Signed-off-by: Hyunchul Lee --- Documentation/filesystems/f2fs.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt index 13c2ff0..414a160 100644 --- a/Documentation/filesystems/f2fs.txt +++ b

Re: [f2fs-dev] [PATCH 1/2] f2fs: pass down write hints to block layer for bufferd write

2017-12-27 Thread Hyunchul Lee
Hi Jaegeuk, On 12/28/2017 12:26 PM, Jaegeuk Kim wrote: > On 12/23, Chao Yu wrote: >> On 2017/12/15 10:06, Jaegeuk Kim wrote: >>> On 12/14, Hyunchul Lee wrote: >>>> Hi Jaegeuk, >>>> >>>> I need your comment about the fs_iohint mount option. &

Re: [f2fs-dev] [PATCH 1/2] f2fs: pass down write hints to block layer for bufferd write

2017-12-17 Thread Hyunchul Lee
Hi Jaegeuk, Agreed. If Chao agrees with this policy, I will implement it. Thanks for the comment. On 12/15/2017 11:06 AM, Jaegeuk Kim wrote: > On 12/14, Hyunchul Lee wrote: >> Hi Jaegeuk, >> >> I need your comment about the fs_iohint mount option. >> >> a) w/o f

Re: [f2fs-dev] [PATCH 1/2] f2fs: pass down write hints to block layer for bufferd write

2017-12-13 Thread Hyunchul Lee
for users, and LIFE_SHORT and LIFE_EXTREME is converted to different hints by F2FS. Thanks. On 12/12/2017 11:45 AM, Chao Yu wrote: > Hi Hyunchul, > > On 2017/12/12 10:15, Hyunchul Lee wrote: >> Hi Chao, >> >> On 12/11/2017 10:15 PM, Chao Yu wrote: >>> Hi

Re: [f2fs-dev] [PATCH 1/2] f2fs: pass down write hints to block layer for bufferd write

2017-12-11 Thread Hyunchul Lee
Hi Chao, On 12/11/2017 10:15 PM, Chao Yu wrote: > Hi Hyunchul, > > On 2017/12/1 16:28, Hyunchul Lee wrote: >> Hi Chao, >> >> On 11/30/2017 04:06 PM, Chao Yu wrote: >>> Hi Hyunchul, >>> >>> On 2017/11/28 8:23, Hyunchul Lee wrote: >>&g

Re: [f2fs-dev] [PATCH 1/2] f2fs: pass down write hints to block layer for bufferd write

2017-12-01 Thread Hyunchul Lee
Hi Jaegeuk, On 12/01/2017 04:28 PM, Jaegeuk Kim wrote: > On 11/30, Chao Yu wrote: >> On 2017/11/28 8:23, Hyunchul Lee wrote: >>> From: Hyunchul Lee >>> >>> This implements which hint is passed down to block layer >>> for datas from th

Re: [f2fs-dev] [PATCH 1/2] f2fs: pass down write hints to block layer for bufferd write

2017-12-01 Thread Hyunchul Lee
Hi Chao, On 11/30/2017 04:06 PM, Chao Yu wrote: > Hi Hyunchul, > > On 2017/11/28 8:23, Hyunchul Lee wrote: >> From: Hyunchul Lee >> >> This implements which hint is passed down to block layer >> for datas from the specific segment type. >> &g

[f2fs-dev] [PATCH 2/2] f2fs: pass down write hints to block layer for direct write

2017-11-27 Thread Hyunchul Lee
From: Hyunchul Lee This implements which hint is passed down to block layer for direct write. (allocated file hintsegment type) io hint -- WRITE_LIFE_SHORT HOT_DATAWRITE_LIFE_MEDIUM WRITE_LIFE_EXTREME

[f2fs-dev] [PATCH v2] f2fs: apply write hints to select the type of segment for direct write

2017-11-27 Thread Hyunchul Lee
From: Hyunchul Lee When blocks are allocated for direct write, select the type of segment using the kiocb hint. But if an inode has FI_NO_ALLOC, use the inode hint. Signed-off-by: Hyunchul Lee --- v2: - Add a new member, m_seg_type to struct f2fs_map_blocks. - Assign the segment type to

[f2fs-dev] [PATCH 1/2] f2fs: pass down write hints to block layer for bufferd write

2017-11-27 Thread Hyunchul Lee
From: Hyunchul Lee This implements which hint is passed down to block layer for datas from the specific segment type. segment type hints - COLD_NODE & COLD_DATAWRITE_LIFE_EXTREME WARM_

Re: [f2fs-dev] [RFC PATCH 0/2] apply write hints to select the type of segments

2017-11-19 Thread Hyunchul Lee
On 11/18/2017 03:53 AM, Jaegeuk Kim wrote: > ... >>>>>>>>>>>>>>>>> From: Hyunchul Lee >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Using write hi

Re: [f2fs-dev] [RFC PATCH 0/2] apply write hints to select the type of segments

2017-11-15 Thread Hyunchul Lee
On 11/16/2017 12:58 PM, Jaegeuk Kim wrote: > On 11/16, Chao Yu wrote: >> On 2017/11/16 8:56, Hyunchul Lee wrote: >>> >>> On 11/16/2017 01:27 AM, Jaegeuk Kim wrote: >>>> On 11/14, Chao Yu wrote: >>>>> On 2017/11/14 12:20, Jaegeuk Kim wrote: >

Re: [f2fs-dev] [RFC PATCH 0/2] apply write hints to select the type of segments

2017-11-15 Thread Hyunchul Lee
On 11/16/2017 01:27 AM, Jaegeuk Kim wrote: > On 11/14, Chao Yu wrote: >> On 2017/11/14 12:20, Jaegeuk Kim wrote: >>> On 11/13, Hyunchul Lee wrote: >>>> On 11/13/2017 10:59 AM, Chao Yu wrote: >>>>> On 2017/11/13 9:35, Hyunchul Lee wrote: >>>

Re: [f2fs-dev] [RFC PATCH 0/2] apply write hints to select the type of segments

2017-11-12 Thread Hyunchul Lee
On 11/13/2017 10:59 AM, Chao Yu wrote: > On 2017/11/13 9:35, Hyunchul Lee wrote: >> On 11/13/2017 10:26 AM, Chao Yu wrote: >>> On 2017/11/13 8:24, Hyunchul Lee wrote: >>>> On 11/10/2017 03:42 PM, Chao Yu wrote: >>>>> On 2017/11/10 8:23, Hyunchul Lee wro

Re: [f2fs-dev] [RFC PATHC 2/2] f2fs: apply write hints to select the type of segment for direct write

2017-11-12 Thread Hyunchul Lee
On 11/13/2017 10:24 AM, Chao Yu wrote: > On 2017/11/13 8:07, Hyunchul Lee wrote: >> On 11/11/2017 09:38 AM, Chao Yu wrote: >>> On 2017/11/9 13:51, Hyunchul Lee wrote: >>>> From: Hyunchul Lee >>>> >>>> Select the type of the segment using

Re: [f2fs-dev] [RFC PATCH 0/2] apply write hints to select the type of segments

2017-11-12 Thread Hyunchul Lee
On 11/13/2017 10:26 AM, Chao Yu wrote: > On 2017/11/13 8:24, Hyunchul Lee wrote: >> On 11/10/2017 03:42 PM, Chao Yu wrote: >>> On 2017/11/10 8:23, Hyunchul Lee wrote: >>>> Hello, Chao >>>> >>>> On 11/09/2017 06:12 PM, Chao Yu wrote: >

Re: [f2fs-dev] [RFC PATCH 0/2] apply write hints to select the type of segments

2017-11-12 Thread Hyunchul Lee
On 11/10/2017 03:42 PM, Chao Yu wrote: > On 2017/11/10 8:23, Hyunchul Lee wrote: >> Hello, Chao >> >> On 11/09/2017 06:12 PM, Chao Yu wrote: >>> On 2017/11/9 13:51, Hyunchul Lee wrote: >>>> From: Hyunchul Lee >>>> >>>> Using

Re: [f2fs-dev] [RFC PATHC 2/2] f2fs: apply write hints to select the type of segment for direct write

2017-11-12 Thread Hyunchul Lee
On 11/11/2017 09:38 AM, Chao Yu wrote: > On 2017/11/9 13:51, Hyunchul Lee wrote: >> From: Hyunchul Lee >> >> Select the type of the segment using write hints, when blocks are >> allocated for direct write. >> >> There are unhandled corner cases. Hints are

Re: [f2fs-dev] [RFC PATCH 0/2] apply write hints to select the type of segments

2017-11-09 Thread Hyunchul Lee
Hello, Chao On 11/09/2017 06:12 PM, Chao Yu wrote: > On 2017/11/9 13:51, Hyunchul Lee wrote: >> From: Hyunchul Lee >> >> Using write hints[1], applications can inform the life time of the data >> written to devices. and this[2] reported that the write hints patch >

[f2fs-dev] [RFC PATCH 0/2] apply write hints to select the type of segments

2017-11-08 Thread Hyunchul Lee
From: Hyunchul Lee Using write hints[1], applications can inform the life time of the data written to devices. and this[2] reported that the write hints patch decreased writes in NAND by 25%. This hints help F2FS to determine the followings. 1) the segment types where the data will be written

[f2fs-dev] [RFC PATHC 2/2] f2fs: apply write hints to select the type of segment for direct write

2017-11-08 Thread Hyunchul Lee
From: Hyunchul Lee Select the type of the segment using write hints, when blocks are allocated for direct write. There are unhandled corner cases. Hints are not applied in in-place update. And if the blocks of a file is not pre-allocated because of the invalid user buffer, CURSEG_WARM_DATA

[f2fs-dev] [RFC PATHC 1/2] f2fs: apply write hints to select the type of segments for buffered write

2017-11-08 Thread Hyunchul Lee
From: Hyunchul Lee Write hints helps F2FS to determine which type of segments would be selected for buffered write. This patch implements the mapping from write hints to segment types as shown below. hints segment type - WRITE_LIFE_SHORT