[f2fs-dev] [PATCH 1/2] f2fs: introduce F2FS_INODE macro to get f2fs_inode

2013-12-26 Thread Jaegeuk Kim
This patch introduces F2FS_INODE that returns struct f2fs_inode * from the inode page. By using this macro, we can remove unnecessary casting codes like below. struct f2fs_inode *ri = &F2FS_NODE(inode_page)->i; -> struct f2fs_inode *ri = F2FS_INODE(inode_page); Signed-off-by: Jaegeuk Kim ---

[f2fs-dev] [PATCH 2/2] f2fs: should put the dnode when NEW_ADDR is detected

2013-12-26 Thread Jaegeuk Kim
When get_dnode_of_data() in get_data_block() returns a successful dnode, we should put the dnode. But, previously, if its data block address is equal to NEW_ADDR, we didn't do that, resulting in a deadlock condition. So, this patch splits original error conditions with this case, and then calls f2f

Re: [f2fs-dev] [PATCH 1/2] f2fs: introduce F2FS_INODE macro to get f2fs_inode

2013-12-26 Thread Chao Yu
Hi, > -Original Message- > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > Sent: Thursday, December 26, 2013 4:17 PM > Cc: linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org; > linux-f2fs-devel@lists.sourceforge.net > Subject: [f2fs-dev] [PATCH 1/2] f2fs: introduce F2FS_INOD

[f2fs-dev] [PATCH] f2fs: convert max_orphans to a field of f2fs_sb_info

2013-12-26 Thread Gu Zheng
Previously, we need to calculate the max orphan num when we try to acquire an orphan inode, but it's a stable value since the super block was inited. So converting it to a field of f2fs_sb_info and use it directly when needed seems a better choose. Signed-off-by: Gu Zheng --- fs/f2fs/checkpoint.

[f2fs-dev] [PATCH] f2fs: check the blocksize before calling generic_direct_IO path

2013-12-26 Thread Jaegeuk Kim
The f2fs supports 4KB block size. If user requests dwrite with under 4KB data, it allocates a new 4KB data block. However, f2fs doesn't add zero data into the untouched data area inside the newly allocated data block. This incurs an error during the xfstest #263 test as follow. 263 12s ... [faile

Re: [f2fs-dev] [PATCH v2] f2fs: introduce F2FS_INODE macro to get f2fs_inode

2013-12-26 Thread Jaegeuk Kim
Hi, Nice catch. :) Change log from v1: o handle recover_inode_page too >From 58bfaf44df58082c72882b235cae611c975537d4 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Thu, 26 Dec 2013 16:30:41 +0900 Subject: [PATCH] f2fs: introduce F2FS_INODE macro to get f2fs_inode This patch introduces F2FS

[f2fs-dev] Можем собрать для Вас контакты только Ваших потенциальных клиентов несколько десятков тысяч в течение суток Skype: prodawez389

2013-12-26 Thread linux-f2fs-devel
Можем собрать для Вас контакты только Ваших потенциальных клиентов несколько десятков тысяч в течение суток Skype: prodawez389 -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don'

[f2fs-dev] [PATCH 4/6] f2fs: refactor f2fs_convert_inline_data

2013-12-26 Thread Jaegeuk Kim
This patch refactors f2fs_convert_inline_data to check a couple of conditions internally for deciding whether it needs to convert inline_data or not. So, the new f2fs_convert_inline_data initially checks: 1) f2fs_has_inline_data(), and 2) the data size to be changed. If the inode has inline_data

[f2fs-dev] [PATCH 6/6] f2fs: add inline_data recovery routine

2013-12-26 Thread Jaegeuk Kim
This patch adds a inline_data recovery routine with the following policy. [prev.] [next] of inline_data flag o o -> recover inline_data o x -> remove inline_data, and then recover data blocks x o -> remove inline_data, and then recover inline_data x x -> rec

[f2fs-dev] [PATCH 1/6] f2fs: don't need to get f2fs_lock_op for the inline_data test

2013-12-26 Thread Jaegeuk Kim
This patch locates checking the inline_data prior to calling f2fs_lock_op() in truncate_blocks(), since getting the lock is unnecessary. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c inde

[f2fs-dev] [PATCH 2/6] f2fs: convert inline_data for punch_hole

2013-12-26 Thread Jaegeuk Kim
In the punch_hole(), let's convert inline_data all the time for simplicity and to avoid potential deadlock conditions. It is pretty much not a big deal to do this. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 22 +++--- 1 file changed, 3 insertions(+), 19 deletions(-) diff --

[f2fs-dev] [PATCH 5/6] f2fs: add the number of inline_data files to status info

2013-12-26 Thread Jaegeuk Kim
This patch adds the number of inline_data files into the status information. Note that the number is reset whenever the filesystem is newly mounted. Signed-off-by: Jaegeuk Kim --- fs/f2fs/debug.c | 3 +++ fs/f2fs/f2fs.h | 16 +++- fs/f2fs/inline.c | 2 ++ fs/f2fs/inode.c | 1 +

[f2fs-dev] [PATCH 3/6] f2fs: call f2fs_put_page at the error case

2013-12-26 Thread Jaegeuk Kim
In f2fs_write_begin(), if f2fs_conver_inline_data() returns an error like -ENOSPC, f2fs should call f2fs_put_page(). Otherwise, it is remained as a locked page, resulting in the following bug. [] sleep_on_page+0xe/0x20 [] __lock_page+0x67/0x70 [] truncate_inode_pages_range+0x368/0x5d0 [] truncate_

Re: [f2fs-dev] [PATCH 5/6] f2fs: add the number of inline_data files to status info

2013-12-26 Thread Jaegeuk Kim
Change log from v1: o fix kbuild failure >From a9ebdcffd30b9642b2973ea8e9688e7b0d4bf7e3 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Tue, 26 Nov 2013 11:08:57 +0900 Subject: [PATCH] f2fs: add the number of inline_data files to status info This patch adds the number of inline_data files into

[f2fs-dev] [PATCH] f2fs: fix build warning for f2fs_has_inline_data()

2013-12-26 Thread Haicheng Li
This patch is to fix the issue reported by Fengguang Wu: > Note: the f2fs/linux-3.4 HEAD 22a48d188024830d61365ce97a0a8a0bedd494a9 builds > fine. > It only hurts bisectibility. > > All error/warnings: > >In file included from fs/f2fs/data.c:22:0: >fs/f2fs/data.c: In function 'f2fs_dir