[f2fs-dev] [PATCH 3/3] f2fs: add an sysfs entry to control the directory level

2014-02-27 Thread Jaegeuk Kim
: Jaegeuk Kim --- Documentation/filesystems/f2fs.txt | 7 +++ fs/f2fs/f2fs.h | 3 +++ fs/f2fs/super.c| 7 +++ 3 files changed, 17 insertions(+) diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt index 8eb06b0..803784e

[f2fs-dev] [PATCH 1/3] f2fs: remove costly bit operations for f2fs_find_entry

2014-02-27 Thread Jaegeuk Kim
It turns out that a bit operation like find_next_bit is not always fast enough for f2fs_find_entry. Instead, it is pretty much simple and fast to traverse each dentries. Signed-off-by: Jaegeuk Kim --- fs/f2fs/dir.c | 32 +--- 1 file changed, 17 insertions(+), 15

Re: [f2fs-dev] Regression in kernel 3.14.0-rc1

2014-02-27 Thread Jaegeuk Kim
; http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk > ___ > Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel -- Jaegeuk Kim Samsung ---

[f2fs-dev] [PATCH] f2fs: fix to write node pages with WRITE_SYNC

2014-03-02 Thread Jaegeuk Kim
ed. The performance numbers are like below, which is measured by Alex. 1. 355MB/s ext4 2. 225MB/s f2fs : WRITE for node writes 3. 525MB/s f2fs : WRITE_SYNC for node writes Reported-And-Tested-by: Alex . Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 2 +- 1 file changed, 1 inserti

Re: [f2fs-dev] [PATCH] HACKING: document where to send patches

2014-03-04 Thread Jaegeuk Kim
CKING b/HACKING > new file mode 100644 > index 000..515b73e > --- /dev/null > +++ b/HACKING > @@ -0,0 +1 @@ > +Send patches to linux-f2fs-devel@lists.sourceforge.net -- Jaegeuk Kim Samsung --

Re: [f2fs-dev] [PATCH 1/5] f2fs: update start nid only once each circle

2014-03-09 Thread Jaegeuk Kim
y works. > >> Faster operations. Version large binaries. Built-in WAN optimization and > >> the > >> freedom to use Git, Perforce or both. Make the move to Perforce. > >> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk > >>

Re: [f2fs-dev] [PATCH 4/5] f2fs: optimize restore_node_summary slightly

2014-03-09 Thread Jaegeuk Kim
ment.c > +++ b/fs/f2fs/segment.c > @@ -1160,9 +1160,12 @@ static int read_normal_summaries(struct f2fs_sb_info > *sbi, int type) > ns->ofs_in_node = 0; > } > } else { > - if (restore_

Re: [f2fs-dev] [PATCH 5/5] f2fs: add a wait queue to avoid unnecessary, build_free_nid

2014-03-09 Thread Jaegeuk Kim
s(sbi); > mutex_unlock(&nm_i->build_lock); > + wake_up_all(&nm_i->build_wq); > goto retry; > } > > @@ -1813,6 +1820,7 @@ static int init_node_manager(struct f2fs_sb_info *sbi) > INIT_LIST_HEAD(&nm_i->dirty_nat_entries); > > mutex_init

Re: [f2fs-dev] [PATCH 4/5] f2fs: optimize restore_node_summary slightly

2014-03-09 Thread Jaegeuk Kim
Hi, 2014-03-10 (월), 13:13 +0800, Chao Yu: > Hi Gu, Kim: > > One more comment. > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > > Sent: Monday, March 10, 2014 12:46 PM > > To: Gu Zheng > > Cc: linux-kernel; f

Re: [f2fs-dev] [PATCH] f2fs: fix incorrect parsing with option string

2014-03-17 Thread Jaegeuk Kim
, > set_opt(sbi, BG_GC); > - else if (!strncmp(name, "off", 3)) > + else if (!strncmp(name, "off", strlen(name))) >

[f2fs-dev] [PATCH 5/5] f2fs: call f2fs_wait_on_page_writeback instead of native function

2014-03-18 Thread Jaegeuk Kim
If a page is on writeback, f2fs can face with deadlock due to under writepages. This is caused by merging IOs inside f2fs, so if it comes to detect, let's throw merged IOs, which is implemented by f2fs_wait_on_page_writeback. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 6 ++---

[f2fs-dev] [PATCH 1/5] f2fs: introduce get_dirty_dents for readability

2014-03-18 Thread Jaegeuk Kim
The get_dirty_dents gives us the number of dirty dentry pages. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/f2fs.h | 5 + fs/f2fs/inode.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c

[f2fs-dev] [PATCH 4/5] f2fs: introduce nr_pages_to_write for segment alignment

2014-03-18 Thread Jaegeuk Kim
This patch introduces nr_pages_to_write to align page writes to the segment or other operational unit size, which can be tuned according to the system environment. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 11 ++- fs/f2fs/data.c | 12 +++- fs/f2fs/node.c

[f2fs-dev] [PATCH 2/5] f2fs: avoid small data writes by skipping writepages

2014-03-18 Thread Jaegeuk Kim
This patch introduces nr_pages_to_skip(sbi, type) to determine writepages can be skipped. The dentry, node, and meta pages can be conrolled by F2FS without breaking the FS consistency. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 4 ++-- fs/f2fs/data.c | 4 fs/f2fs/node.c

[f2fs-dev] [PATCH 3/5] f2fs: increase pages_skipped when skipping writepages

2014-03-18 Thread Jaegeuk Kim
This patch increases pages_skipped when skipping writepages. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 11 ++- fs/f2fs/data.c | 6 +- fs/f2fs/node.c | 6 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs

[f2fs-dev] [PATCH 2/5] f2fs: throttle the memory footprint with a sysfs entry

2014-03-19 Thread Jaegeuk Kim
/ 1024) = 10MB. Signed-off-by: Jaegeuk Kim --- Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++ Documentation/filesystems/f2fs.txt | 4 fs/f2fs/f2fs.h | 1 + fs/f2fs/node.c | 23 --- fs/f2fs/node.h

[f2fs-dev] [PATCH 5/5] f2fs: change reclaim rate in percentage

2014-03-19 Thread Jaegeuk Kim
It is more reasonable to determine the reclaiming rate of prefree segments according to the volume size, which is set to 5% by default. For example, if the volume is 128GB, the prefree segments are reclaimed when the number reaches to 6.4GB. Signed-off-by: Jaegeuk Kim --- Documentation

[f2fs-dev] [PATCH 1/5] f2fs: avoid to drop nat entries due to the negative nr_shrink

2014-03-19 Thread Jaegeuk Kim
The try_to_free_nats should not receive the negative nr_shrink. Otherwise, it can drop all the nat entries by the while loop. Signed-off-by: Jaegeuk Kim --- fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 707fd20..04450a5

[f2fs-dev] [PATCH 3/5] f2fs: remove unnecessary threshold

2014-03-19 Thread Jaegeuk Kim
The NM_WOUT_THRESHOLD is now obsolete since f2fs starts to control on a basis of the memory footprint. Signed-off-by: Jaegeuk Kim --- fs/f2fs/debug.c | 8 fs/f2fs/node.c | 5 + fs/f2fs/node.h | 3 --- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/fs/f2fs/debug.c

[f2fs-dev] [PATCH 4/5] f2fs: add missing documentation for dir_level

2014-03-19 Thread Jaegeuk Kim
This patch adds missing dir_level documentation. Signed-off-by: Jaegeuk Kim --- Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs index 4ac2c25..62dd725 100644

[f2fs-dev] [PATCH 2/3] f2fs: skip unnecessary node writes during fsync

2014-03-20 Thread Jaegeuk Kim
node block. Otherwise, we should do a new node block with the mark for roll-forward recovery. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 1 + fs/f2fs/file.c | 2 ++ fs/f2fs/node.c | 37 - fs/f2fs/node.h | 1 + 4 files changed, 32 insertions(+), 9

[f2fs-dev] [PATCH 1/3] f2fs: introduce fi->i_sem to protect fi's info

2014-03-20 Thread Jaegeuk Kim
This patch introduces fi->i_sem to protect fi's info that includes xattr_ver, pino, i_nlink. This enables to remove i_mutex during f2fs_sync_file, resulting in performance improvement when a number of fsync calls are triggered from many concurrent threads. Signed-off-by: Jaegeuk Kim ---

[f2fs-dev] [PATCH 3/3] f2fs: avoid RECLAIM_FS-ON-W warning

2014-03-20 Thread Jaegeuk Kim
/0x180 f2fs_init_acl+0x29/0xcc [f2fs] __f2fs_add_link+0x259/0x710 [f2fs] f2fs_create+0xad/0x1c0 [f2fs] vfs_create+0xed/0x150 do_last+0xd36/0xed0 path_openat+0xc5/0x680 do_filp_open+0x43/0xa0 do_sys_open+0x13c/0x230 SyS_creat+0x1e/0x20 system_call_fastpath+0x16/0x1b Signed-off-by: Jaegeuk

[f2fs-dev] [PATCH] f2fs: return -EIO when node id is not matched

2014-04-01 Thread Jaegeuk Kim
During the cleaing of node segments, F2FS can get errored node blocks due to data race between node page lock and its valid bitmap operations. In that case, it needs to return an error to skip such the obsolete block copy. Signed-off-by: Jaegeuk Kim --- fs/f2fs/node.c | 3 +-- 1 file changed, 1

Re: [f2fs-dev] [PATCH 1/2] f2fs: avoid free slab cache under spinlock

2014-04-01 Thread Jaegeuk Kim
> nm_i->fcnt++; > } > spin_unlock(&nm_i->free_nid_list_lock); > + > + if (need_free) > + kmem_cache_free(free

[f2fs-dev] [PATCH] f2fs: fix to cover io->bio with io_rwsem

2014-04-01 Thread Jaegeuk Kim
In the f2fs_wait_on_page_writeback, io->bio should be covered by io_rwsem. Otherwise, the bio pointer can become a dangling pointer due to data races. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/segment.c b

[f2fs-dev] [PATCH] f2fs: introduce f2fs_issue_flush to avoid redundant flush issue

2014-04-02 Thread Jaegeuk Kim
option can be used under a workload consisting of very intensive concurrent fsync calls, while the storage handles cache_flush commands slowly. Signed-off-by: Jaegeuk Kim --- Documentation/filesystems/f2fs.txt | 4 ++ fs/f2fs/f2fs.h | 16 +++ fs/f2fs/file.c

Re: [f2fs-dev] [PATCH v2] f2fs: introduce f2fs_issue_flush to avoid redundant flush issue

2014-04-03 Thread Jaegeuk Kim
change log from v1: o do not create a flush thread, if the option is not set >From deb512157c4bcae079197eb55590e3e764cedc7f Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Wed, 2 Apr 2014 15:34:36 +0900 Subject: [PATCH] f2fs: introduce f2fs_issue_flush to avoid redundant flush issue Cc: li

Re: [f2fs-dev] f2fs: kernel BUG at fs/f2fs/segment.h:543

2014-04-06 Thread Jaegeuk Kim
8b 8d > d0 06 00 00 8b 50 78 8b 80 84 00 00 00 d3 e0 41 39 d6 8d 44 02 ff 73 09 <0f> > 0b 0f 1f 80 00 00 00 00 41 39 c6 76 03 0f 0b 90 48 8d 43 20 > [ 1789.278327] RIP f2fs_submit_page_mbio (fs/f2fs/segment.h:543 > fs/f2fs/data.c:181) > [ 1789.278327] RSP > > > Th

Re: [f2fs-dev] f2fs: kernel BUG at fs/f2fs/segment.h:543

2014-04-06 Thread Jaegeuk Kim
2014-04-06 (일), 21:55 -0400, Sasha Levin: > On 04/06/2014 09:20 PM, Jaegeuk Kim wrote: > > Hi, > > > > Thank you for the report. > > > > If possible, could you share fsck.f2fs or dump.f2fs on the corrupted > > partition? > > > > Otherwise, how

[f2fs-dev] [GIT PULL] f2fs updates for v3.15

2014-04-06 Thread Jaegeuk Kim
ormat segment_info's show for better legibility f2fs: optimize restore_node_summary slightly Jaegeuk Kim (37): f2fs: update_inode_page should be done all the time f2fs: handle dirty segments inside refresh_sit_entry f2fs: fix to recover xattr node block f2fs: remove the ug

Re: [f2fs-dev] [PATCH 1/7] f2fs: put the bio when issue_flush completed

2014-04-13 Thread Jaegeuk Kim
@@ repeat: > next = cmd->next; > complete(&cmd->wait); > } > + bio_put(bio); > sm_i->dispatch_list = NULL; > } > -- Jaegeuk Kim Samsung ---

Re: [f2fs-dev] [PATCH 0/7] f2fs: some fix and cleanup about flush_merge

2014-04-13 Thread Jaegeuk Kim
nt.c | 102 > > +++- > > fs/f2fs/super.c | 32 ++-- > > 3 files changed, 107 insertions(+), 44 deletions(-) > > > > > -- > To unsubscribe from this list: send the line

[f2fs-dev] [PATCH 1/3] f2fs: remove costly dirty_dir_inode operations

2014-04-15 Thread Jaegeuk Kim
the inode lies on the list or not. Through this simple flag, we can remove redundant operations gracefully. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 52 +--- fs/f2fs/f2fs.h | 3 ++- fs/f2fs/recovery.c | 18

[f2fs-dev] [PATCH 2/3] f2fs: fix to decrease the number of dirty dentry page

2014-04-15 Thread Jaegeuk Kim
The f2fs_write_data_page should decrease the number of dirty dentry page all the time. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 45abd60..9a3fa38 100644 --- a/fs/f2fs/data.c

[f2fs-dev] [PATCH 3/3] f2fs: flush dirty directory pages when scattered pages are gathered

2014-04-15 Thread Jaegeuk Kim
If a lot of directory inodes have the small number of dentry pages in each page cache, there is no chance to flush them periodically. This patch proposes the average number of dirty dentry pages for the threshold. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 2 ++ fs/f2fs/f2fs.h

Re: [f2fs-dev] f2fs: BUG_ON() is triggered when mount valid f2fs filesystem

2014-04-15 Thread Jaegeuk Kim
x27;t incur any performance regression significantly. Could you test this patch? >From 60588ceb7277aae2a79e7f67f5217d1256720d78 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Tue, 15 Apr 2014 13:57:55 +0900 Subject: [PATCH] f2fs: avoid to conduct roll-forward due to the remained garbage blocks

Re: [f2fs-dev] [PATCH 2/3 v2] f2fs: fix to decrease the number of dirty dentry page

2014-04-15 Thread Jaegeuk Kim
Change log from v1: o change the patch, which includes this bug fix >From 0f3b8427b40b9ace829ba0b16336d5cd67589022 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Tue, 15 Apr 2014 16:04:15 +0900 Subject: [PATCH] f2fs: call redirty_page_for_writepage This patch replace some general codes w

Re: [f2fs-dev] [PATCH 3/3] f2fs: flush dirty directory pages when scattered pages are gathered

2014-04-15 Thread Jaegeuk Kim
Hi all, Please ignore this, since it turns out that is doesn't solve the problem. Instead, please consider the following patch. >From ac9ad0b1de42dc311323b9c3b8f431f4b097b43b Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Wed, 16 Apr 2014 10:47:06 +0900 Subject: [PATCH] f2fs: adjust

[f2fs-dev] [PATCH] f2fs: fix to unlock f2fs_lock at the omitted error case

2014-04-16 Thread Jaegeuk Kim
If it occurs an error, we should call f2fs_unlock_op. Signed-off-by: Jaegeuk Kim --- fs/f2fs/inline.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 383db1f..3258c7c 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c

Re: [f2fs-dev] f2fs: BUG_ON() is triggered when mount valid f2fs filesystem

2014-04-16 Thread Jaegeuk Kim
that, the image will be mounted without "disable_roll_forward". Thanks, > > 15.04.2014 15:04, Jaegeuk Kim пишет: > > Hi, > > > > Thank you for the report. > > I retrieved the fault image and found out that previous garbage data > > wreak such the wrong b

Re: [f2fs-dev] [PATCH] f2fs: fix wrong number of max_nid when init

2014-04-17 Thread Jaegeuk Kim
ocks - 3; > + nm_i->max_nid = NAT_ENTRY_PER_BLOCK * nat_blocks; > nm_i->fcnt = 0; > nm_i->nat_cnt = 0; > nm_i->ram_thresh = DEF_RAM_THRESHOLD; -- Jaegeuk Kim Samsung -- Learn

Re: [f2fs-dev] f2fs: BUG_ON() is triggered when mount valid f2fs filesystem

2014-04-17 Thread Jaegeuk Kim
ecurity hole? Did you mean it needs to avoid such the BUG_ONs if the image has obsolete data being used before? Thanks, > > Regards, > Alexey > > > On 16.04.2014 16:35, Jaegeuk Kim wrote: > > Hi, > > > > 2014-04-16 (수), 13:11 +0400, Andrey Tsyvarev: >

Re: [f2fs-dev] [PATCH] f2fs: fix to enable readahead last NAT block

2014-04-17 Thread Jaegeuk Kim
>nat_cnt = 0; nm_i->ram_thresh = DEF_RAM_THRESHOLD; -- 1.8.4.474.g128a96c -- Jaegeuk Kim Samsung -- Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guid

Re: [f2fs-dev] [PATCH] f2fs: fix to enable readahead last NAT block

2014-04-17 Thread Jaegeuk Kim
Got it. The patch is like this. Thanks, >From 5f7a3bcf0df10bbb47a6e4409cc92ba8e6090674 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Fri, 18 Apr 2014 11:14:37 +0900 Subject: [PATCH] f2fs: add available_nids to fix handling max_nid correctly This patch introduces available_nids for alloc_n

Re: [f2fs-dev] f2fs: BUG_ON() is triggered when mount valid f2fs filesystem

2014-04-17 Thread Jaegeuk Kim
Thank you for the explanation. The following patch will resolve the issue. Thanks, >From 2048e7458c982f4297da9d3366ab29224ae2e8b0 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Fri, 18 Apr 2014 15:21:04 +0900 Subject: [PATCH] f2fs: avoid BUG_ON when mouting corrupted image having garb

[f2fs-dev] [PATCH] f2fs: adjust free mem size to flush dentry blocks

2014-04-18 Thread Jaegeuk Kim
If so many dirty dentry blocks are cached, not reached to the flush condition, we should fall into livelock in balance_dirty_pages. So, let's consider the mem size for the condition. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 3 ++- fs/f2fs/f2fs.h | 1 + fs/f2fs/node.c

[f2fs-dev] [PATCH 1/3] f2fs: clean up long variable names

2014-04-22 Thread Jaegeuk Kim
This patch includes simple clean-ups to reduce unnecessary long variable names. Signed-off-by: Jaegeuk Kim --- fs/f2fs/xattr.c | 86 + fs/f2fs/xattr.h | 6 ++-- 2 files changed, 47 insertions(+), 45 deletions(-) diff --git a/fs/f2fs

[f2fs-dev] [PATCH 2/3] f2fs: pass flags field to setxattr functions

2014-04-22 Thread Jaegeuk Kim
This patch passes the "flags" field to the low level setxattr functions to use XATTR_REPLACE in the following patches. Signed-off-by: Jaegeuk Kim --- fs/f2fs/acl.c | 2 +- fs/f2fs/xattr.c | 13 +++-- fs/f2fs/xattr.h | 4 ++-- 3 files changed, 10 insertions(+), 9 deletion

[f2fs-dev] [PATCH 3/3] f2fs: return errors right after checking them

2014-04-22 Thread Jaegeuk Kim
This patch adds two error conditions early in the setxattr operations. Signed-off-by: Jaegeuk Kim --- fs/f2fs/xattr.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index bbe9c2b..6073f9f 100644 --- a/fs/f2fs/xattr.c +++ b/fs/f2fs

[f2fs-dev] [PATCH] f2fs-tools: announce dual licenses with GPL and LGPL v2

2014-04-24 Thread Jaegeuk Kim
This patch announces LGPL v2 for the following files. - include/f2fs_fs.h - lib/libf2fs.c - lib/libf2fs_io.c - mkfs/f2fs_format.c - mkfs/f2fs_format_main.c - mkfs/f2fs_format_utils.c - mkfs/f2fs_format_utils.h Signed-off-by: Jaegeuk Kim --- COPYING | 492

[f2fs-dev] [PATCH 1/2] f2fs: return i_size if the hole is outside of i_size

2014-04-28 Thread Jaegeuk Kim
When SEEK_HOLE is requeted, it should return i_size if the hole position is found outside of i_size. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index d99d173..3112857 100644 --- a/fs/f2fs

[f2fs-dev] [PATCH 2/2] f2fs: consider fallocated space for SEEK_DATA

2014-04-28 Thread Jaegeuk Kim
. N 2) write 4KB at 5MB offset f -> N N N N N X N N N N N N ... N 3) SEEK_DATA from 0 should return 5MB offset So, this patch adds a routine to search the first dirty page to handle that. Then, the SEEK_DATA flow skips NEW_ADDR offsets until any dirty page is found. Signed-off-by: Jaege

Re: [f2fs-dev] [PATCH 3/3 v3] f2fs: fix to truncate inline data in inode page when setattr

2014-04-28 Thread Jaegeuk Kim
ny bugs in there? > + zero_user_segment(ipage, INLINE_DATA_OFFSET + from, > + INLINE_DATA_OFFSET + MAX_INLINE_DATA); > + set_page_dirty(ipage); > + f2fs_put_page(ipage, 1); > +} > + > int recover_inline_data(struct inode *inode, struct page *npage) >

Re: [f2fs-dev] [PATCH 3/3 v3] f2fs: fix to truncate inline data in inode page when setattr

2014-04-29 Thread Jaegeuk Kim
Hi, 2014-04-29 (화), 15:53 +0800, Chao Yu: > Hi Kim, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > > Sent: Tuesday, April 29, 2014 2:16 PM > > To: Chao Yu > > Cc: linux-f2fs-devel@lists.sourceforge.net; linux-fs

[f2fs-dev] [PATCH 4/4] f2fs: decrease the lock granularity during write_begin

2014-04-29 Thread Jaegeuk Kim
This patch reduces the lock granularity during write_begin. When the system is under memory pressure, it would be better to reduce the locking time for the data pages. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git

[f2fs-dev] [PATCH 2/4] f2fs: avoid grab_cache_page_write_begin for data pages

2014-04-29 Thread Jaegeuk Kim
We don't need to wait on page writeback for these cases. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 4 ++-- fs/f2fs/inline.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 273fe16..91ff104 100644

[f2fs-dev] [PATCH 1/4] f2fs: split grab_cache_page and wait_on_page_writeback for node pages

2014-04-29 Thread Jaegeuk Kim
This patch splits grab_cache_page_write_begin into grab_cache_page and wait_on_page_writeback for node pages. This patch intends to enhance the latency to get node pages by alleviating unnecessary wait_on_page_writeback. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/dir.c

[f2fs-dev] [PATCH 3/4] f2fs: no need to wait on page writebck to meta pages

2014-04-29 Thread Jaegeuk Kim
This patch removes grab_cache_page_write_begin for meta pages. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 1346ce9..b6f6ead 100644 --- a/fs/f2fs/checkpoint.c +++ b

[f2fs-dev] [PATCH] f2fs: deactivate inode page if the inode is evicted

2014-04-29 Thread Jaegeuk Kim
If the inode page is clean during its inode eviction, it'd better drop the page to reduce further memory pressure. Signed-off-by: Jaegeuk Kim --- fs/f2fs/inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index f7a6553..adc622c 100644 --- a/fs

Re: [f2fs-dev] Segment size

2014-05-06 Thread Jaegeuk Kim
et > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel -- Jaegeuk Kim Samsung -- Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity

Re: [f2fs-dev] [PATCH 6/6] f2fs: add a tracepoint for f2fs_read_data_pages

2014-05-06 Thread Jaegeuk Kim
show_dev_ino(__entry), > + (unsigned long)__entry->start, > + __entry->nrpage) > +); > + > TRACE_EVENT(f2fs_submit_page_mbio, > > TP_PROTO(struct page *page, int rw, int type, block_t blk_addr), -- Jaegeuk Kim Samsung ---

Re: [f2fs-dev] crash of f2fs partition

2014-05-08 Thread Jaegeuk Kim
for releasing software faster > • Expert tips and advice for migrating your SCM now > http://p.sf.net/sfu/perforce > ___ Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f

Re: [f2fs-dev] Segment size

2014-05-08 Thread Jaegeuk Kim
2014-05-08 (목), 12:43 -0700, Paul Ni: > On 6 May 2014 17:04, Jaegeuk Kim wrote: > > > > Hi, > > > > 2014-05-04 (일), 23:59 +, Paul Ni: > > > Is it possible to set an arbitrary segment size? I'm trying to set it > > > to 1.5MiB to make i

Re: [f2fs-dev] [PATCH] f2fs: avoid crash when trace f2fs_submit_page_mbio event in ra_sum_pages

2014-05-20 Thread Jaegeuk Kim
sum_entry++; > } > - unlock_page(page); > + unlock_page(pages[index]); > skip: > - list_del(&page->lru); > - __free_pages(page, 0); > +

Re: [f2fs-dev] [PATCH] f2fs: large volume support

2014-05-20 Thread Jaegeuk Kim
+++ b/include/linux/f2fs_fs.h > @@ -19,6 +19,7 @@ > #define F2FS_LOG_SECTORS_PER_BLOCK 3 /* 4KB: F2FS_BLKSIZE */ > #define F2FS_BLKSIZE 4096/* support only 4KB block */ > #define F2FS_MAX_EXTENSION 64 /* # of extension entries */ > +#define

[f2fs-dev] [PATCH 1/3] f2fs: fix to recover data written by dio

2014-06-07 Thread Jaegeuk Kim
If data are overwritten through dio, previous f2fs doesn't remain the fsync mark due to no additional node writes. Note that this patch should resolve the xfstests:311. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 3 +++ fs/f2fs/f2fs.h | 1 + fs/f2fs/node.c | 12 3

[f2fs-dev] [PATCH 2/3] f2fs: recover fallocated space

2014-06-07 Thread Jaegeuk Kim
If a fallocated file is fsynced, we should recover the i_size after sudden power cut. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index d97e5c4..78110da 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c

[f2fs-dev] [PATCH 3/3] f2fs: avoid not to call remove_dirty_inode

2014-06-07 Thread Jaegeuk Kim
fixes such the bug case by handling the iget and iput in the recovery_dentry procedure. Signed-off-by: Jaegeuk Kim --- fs/f2fs/recovery.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index e950a2f..a112368

[f2fs-dev] [PATCH] f2fs: support f2fs_fiemap

2014-06-09 Thread Jaegeuk Kim
This patch links f2fs_fiemap with generic function with get_block. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 6 ++ fs/f2fs/f2fs.h | 1 + fs/f2fs/file.c | 1 + 3 files changed, 8 insertions(+) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 39fe7d7..c1fb6dd 100644 --- a/fs/f2fs

[f2fs-dev] [GIT PULL] f2fs updates for v3.16

2014-06-09 Thread Jaegeuk Kim
dd the flush_merge handle in the remount flow f2fs: introduce struct flush_cmd_control to wrap the flush_merge fields f2fs: introduce help function {create,destroy}_flush_cmd_control Jaegeuk Kim (25): f2fs: avoid to conduct roll-forward due to the remained garbage block

[f2fs-dev] [PATCH] libf2fs, fsck, mkfs: call f2fs_finalize_device before exit

2014-06-13 Thread Jaegeuk Kim
The fsck tool should call f2fs_finalize_device before exit to close the device file. Signed-off-by: Jaegeuk Kim --- fsck/main.c | 3 +++ include/f2fs_fs.h| 1 + lib/libf2fs.c| 12 mkfs/f2fs_format.c | 2 -- mkfs/f2fs_format_main.c | 2

[f2fs-dev] [PATCH] mkfs: set BLKDISCARD by default

2014-06-13 Thread Jaegeuk Kim
And let's show some debug info as well. Signed-off-by: Jaegeuk Kim --- mkfs/Makefile.am | 2 +- mkfs/f2fs_format_utils.c | 6 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mkfs/Makefile.am b/mkfs/Makefile.am index 68cab66..ff136a7 100644 --- a/mkfs/Makefi

[f2fs-dev] [PATCH 3/3] f2fs: fix not to allocate unnecessary blocks during fallocate

2014-06-13 Thread Jaegeuk Kim
, 5 blocks, f2fs allocates 6 blocks including pg_end. So, this patch adds one condition to avoid block allocation. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 623df73..d621ddb 100644 --- a

Re: [f2fs-dev] [PATCH v3] f2fs: add a rw_sem to cover quota flag changes

2019-06-21 Thread Jaegeuk Kim
On 06/20, Chao Yu wrote: > On 2019/6/20 1:26, Jaegeuk Kim wrote: > > On 06/18, Chao Yu wrote: > >> On 2019/6/14 10:46, Jaegeuk Kim wrote: > >>> On 06/11, Chao Yu wrote: > >>>> On 2019/6/5 2:36, Jaegeuk Kim wrote: > >>>>>

Re: [f2fs-dev] [PATCH v3] f2fs: add a rw_sem to cover quota flag changes

2019-06-21 Thread Jaegeuk Kim
On 06/21, Jaegeuk Kim wrote: > On 06/20, Chao Yu wrote: > > On 2019/6/20 1:26, Jaegeuk Kim wrote: > > > On 06/18, Chao Yu wrote: > > >> On 2019/6/14 10:46, Jaegeuk Kim wrote: > > >>> On 06/11, Chao Yu wrote: > > >>>> On 2019/6/5 2

Re: [PATCH -next] f2fs: Use div_u64*() for 64-bit divisions

2019-06-21 Thread Jaegeuk Kim
On 06/21, Geert Uytterhoeven wrote: > Hi Chao, > > On Fri, Jun 21, 2019 at 11:54 AM Chao Yu wrote: > > Since the original patch hasn't been merged to upstream, I think we can > > merge > > this into original patch, how do you think? > > Thanks, that's fine for me. Merged the fix. Thank you so

[f2fs-dev] [PATCH] f2fs: add wsync_mode for sysfs entry

2019-06-21 Thread Jaegeuk Kim
From: Jaegeuk Kim This add one sysfs entry to control REQ_SYNC/REQ_BACKGROUND for write bios for data page writes. Signed-off-by: Jaegeuk Kim --- Documentation/ABI/testing/sysfs-fs-f2fs | 7 +++ Documentation/filesystems/f2fs.txt | 4 fs/f2fs/data.c

Re: [f2fs-dev] [PATCH] fsck.f2fs: write checkpoint with OPU mode

2019-06-22 Thread Jaegeuk Kim
Hi Weichao, This patch breaks the image found by my local power-cut tests. On 05/24, Chao Yu wrote: > This original patch was from Weichao Guo. > > We may encounter both checkpoints invalid in such a case: > 1. kernel writes CP A; > 2. power-cut when kernel writes CP B, then CP B is corrupted; >

Re: [f2fs-dev] [PATCH v5 01/16] fs-verity: add a documentation file

2019-06-22 Thread Jaegeuk Kim
k device based filesystems > - Userspace utility > - Tests > - FAQ > > Reviewed-by: Theodore Ts'o Reviewed-by: Jaegeuk Kim > Signed-off-by: Eric Biggers > --- > Documentation/filesystems/fsverity.rst | 710 + > Documentation/filesystems/index.rs

Re: [f2fs-dev] [PATCH v5 04/16] fs: uapi: define verity bit for FS_IOC_GETFLAGS

2019-06-22 Thread Jaegeuk Kim
; FS_IOC_SETFLAGS won't allow setting it, since an ioctl must be used > instead to provide more parameters. > > This flag matches the on-disk bit that was already allocated for ext4. > > Reviewed-by: Theodore Ts'o Reviewed-by: Jaegeuk Kim > Signed-off-by: Eric B

Re: [f2fs-dev] [PATCH v5 02/16] fs-verity: add MAINTAINERS file entry

2019-06-22 Thread Jaegeuk Kim
On 06/20, Eric Biggers wrote: > From: Eric Biggers > > fs-verity will be jointly maintained by Eric Biggers and Theodore Ts'o. > > Reviewed-by: Theodore Ts'o Reviewed-by: Jaegeuk Kim > Signed-off-by: Eric Biggers > --- > MAINTAINERS | 12 +++

Re: [f2fs-dev] [PATCH v5 03/16] fs-verity: add UAPI header

2019-06-22 Thread Jaegeuk Kim
fstests-dev.git/log/?h=fsverity). > > Reviewed-by: Theodore Ts'o Reviewed-by: Jaegeuk Kim > Signed-off-by: Eric Biggers > --- > Documentation/ioctl/ioctl-number.txt | 1 + > include/uapi/linux/fsverity.h| 39 > 2 files changed,

Re: [f2fs-dev] [PATCH v5 05/16] fs-verity: add Kconfig and the helper functions for hashing

2019-06-22 Thread Jaegeuk Kim
Reviewed-by: Theodore Ts'o Reviewed-by: Jaegeuk Kim > Signed-off-by: Eric Biggers > --- > fs/Kconfig | 2 + > fs/Makefile | 1 + > fs/verity/Kconfig| 38 + > fs/verity/Makefile | 4 + > fs/verity/fs

Re: [f2fs-dev] [PATCH v5 06/16] fs-verity: add inode and superblock fields

2019-06-22 Thread Jaegeuk Kim
rity_info. > > Reviewed-by: Theodore Ts'o Reviewed-by: Jaegeuk Kim > Signed-off-by: Eric Biggers > --- > include/linux/fs.h | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/include/linux/fs.h b/include/linux/fs.h > index f7fdfe93e25d3e

Re: [f2fs-dev] [PATCH v5 08/16] fs-verity: add the hook for file ->setattr()

2019-06-22 Thread Jaegeuk Kim
On 06/20, Eric Biggers wrote: > From: Eric Biggers > > Add a function fsverity_prepare_setattr() which filesystems that support > fs-verity must call to deny truncates of verity files. > > Reviewed-by: Theodore Ts'o Reviewed-by: Jaegeuk Kim > Signed-off-by: Eric B

Re: [f2fs-dev] [PATCH v5 07/16] fs-verity: add the hook for file ->open()

2019-06-22 Thread Jaegeuk Kim
ewed-by: Theodore Ts'o Reviewed-by: Jaegeuk Kim > Signed-off-by: Eric Biggers > --- > fs/verity/Makefile | 3 +- > fs/verity/fsverity_private.h | 54 +- > fs/verity/init.c | 6 + > fs/verity/open.c | 319

Re: [f2fs-dev] [PATCH v5 09/16] fs-verity: add data verification hooks for ->readpages()

2019-06-22 Thread Jaegeuk Kim
Since data verification can block, a workqueue is provided for these > methods to enqueue verification work from their bio completion callback. > > See the "Verifying data" section of > Documentation/filesystems/fsverity.rst for more information. > > Reviewed-by: Theodor

Re: [f2fs-dev] [PATCH v5 10/16] fs-verity: implement FS_IOC_ENABLE_VERITY ioctl

2019-06-22 Thread Jaegeuk Kim
erity.rst for the documentation. > Reviewed-by: Jaegeuk Kim > Signed-off-by: Eric Biggers > --- > fs/verity/Makefile | 3 +- > fs/verity/enable.c | 341 +++ > include/linux/fsverity.h | 64 > 3 files changed, 407 i

Re: [f2fs-dev] [PATCH v5 11/16] fs-verity: implement FS_IOC_MEASURE_VERITY ioctl

2019-06-22 Thread Jaegeuk Kim
t don't match this hash will fail. This ioctl can be > used for authentication or logging of file measurements in userspace. > > See the "FS_IOC_MEASURE_VERITY" section of > Documentation/filesystems/fsverity.rst for the documentation. > > Reviewed-by: Theodor

Re: [f2fs-dev] [PATCH v5 12/16] fs-verity: add SHA-512 support

2019-06-22 Thread Jaegeuk Kim
; store the hashes. But some users may prefer SHA-512. > > Reviewed-by: Theodore Ts'o Reviewed-by: Jaegeuk Kim > Signed-off-by: Eric Biggers > --- > fs/verity/fsverity_private.h | 2 +- > fs/verity/hash_algs.c | 5 + > include/uapi/linux/fsverity.h

Re: [f2fs-dev] [PATCH v5 16/16] f2fs: add fs-verity support

2019-06-22 Thread Jaegeuk Kim
t encrypt xattrs, yet the verity > metadata *must* be encrypted when the file is because it contains hashes > of the plaintext data. > Acked-by: Jaegeuk Kim > Signed-off-by: Eric Biggers > --- > fs/f2fs/Makefile | 1 + > fs/f2fs/data.c | 72 +-- > fs/f2fs

Re: [f2fs-dev] 回复: [PATCH] fsck.f2fs: write checkpoint with OPU mode

2019-06-24 Thread Jaegeuk Kim
>> have a fsck-not-touched correct checkpoint. > > > > Jaegeuk, Weichao, > > > > I think it's okay, let me update the patch. :) > > > >> > >> P.S: did you want to discuss it with Chao Yu? :)HAHA > > > > Weichao, it's glad to see your activ

[PATCH] f2fs: allocate blocks for pinned file

2019-06-27 Thread Jaegeuk Kim
This patch allows fallocate to allocate physical blocks for pinned file. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index e7c368db8185..cdfd4338682d 100644 --- a/fs/f2fs/file.c +++ b/fs

Re: [f2fs-dev] [PATCH] f2fs: allocate blocks for pinned file

2019-06-27 Thread Jaegeuk Kim
On 06/28, Chao Yu wrote: > Hi Jaegeuk, > > On 2019/6/28 1:05, Jaegeuk Kim wrote: > > This patch allows fallocate to allocate physical blocks for pinned file. > > Quoted from manual of fallocate(2): > " > Any subregion within the range specified by offset and le

Re: [PATCH v2] f2fs: allocate blocks for pinned file

2019-06-28 Thread Jaegeuk Kim
This patch allows fallocate to allocate physical blocks for pinned file. Signed-off-by: Jaegeuk Kim --- Documentation/filesystems/f2fs.txt | 25 + fs/f2fs/file.c | 7 ++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a

Re: [PATCH] f2fs: fix 32-bit linking

2019-06-28 Thread Jaegeuk Kim
Hi Arnd, If you don't mind, can I integrate this into the original patch in the queue? Thanks, On 06/28, Arnd Bergmann wrote: > Not all architectures support get_user() with a 64-bit argument: > > ERROR: "__get_user_bad" [fs/f2fs/f2fs.ko] undefined! > > Use copy_from_user() here, this will alw

[f2fs-dev] [PATCH] f2fs: support swap file w/ DIO

2019-07-03 Thread Jaegeuk Kim
Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 142 ++-- fs/f2fs/f2fs.h | 5 +- include/trace/events/f2fs.h | 11 +-- 3 files changed, 143 insertions(+), 15 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 1e2d924e2ea7

[PATCH] f2fs: allow all the users to pin a file

2019-07-04 Thread Jaegeuk Kim
This patch allows users to pin files. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index b164f48e0f31..f8d46df8fa9e 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -2964,9 +2964,6 @@ static int

Re: [f2fs-dev] [PATCH v3 2/2] f2fs-tools: relocate chksum_offset for large_nat_bitmap feature

2019-07-05 Thread Jaegeuk Kim
17:12, Ju Hyung Park wrote: > >>> Hi Jaegeuk and Chao. > >>> > >>> A little bump here. > >>> > >>> We still need to tag a new version of fsck and update f2fs kernel code > >>> to tell which version users should use as we discus

<    5   6   7   8   9   10   11   12   13   14   >