Re: elevator: Fix a race about elevator switching.

2013-04-16 Thread Gu Zheng
majianp...@gmail.com Reviewed-by: Gu Zheng guz.f...@cn.fujitsu.com Tested-by: Gu Zheng guz.f...@cn.fujitsu.com Thanks, Gu --- block/cfq-iosched.c | 17 ++--- block/deadline-iosched.c | 16 +--- block/elevator.c | 25

[PATCH]fs/block_dev.c: fix the inaccurate judgement in function blkdev_aio_read

2013-04-18 Thread Gu Zheng
. Signed-off-by: Jianpeng Ma majianp...@gmail.com Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/block_dev.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index aae187a..f0328f1 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c

Re: [PATCH 2/3] resource: Add release_mem_region_adjustable()

2013-04-03 Thread Gu Zheng
On 04/03/2013 12:17 AM, Toshi Kani wrote: Added release_mem_region_adjustable(), which releases a requested region from a currently busy memory resource. This interface adjusts the matched memory resource accordingly if the requested region does not match exactly but still fits into. This

pci-sysfs: queue sysfs rescan routine into workqueue to avoid potential deadlock situation

2013-02-06 Thread Gu Zheng
-by: Yinghai Lu ying...@kernel.org Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Lin Feng linf...@cn.fujitsu.com --- drivers/pci/pci-sysfs.c | 92 +-- 1 files changed, 65 insertions(+), 27 deletions(-) diff --git a/drivers/pci/pci-sysfs.c b

Re: [PATCH] pci-sysfs: replace mutex_lock with mutex_trylock to avoid potential deadlock situation

2013-01-25 Thread Gu Zheng
* sysfs_deactivate(sd) | ... wait_for_completion() |*5* sysfs_put_active(attr_sd) *6* mutex_unlock(pci_remove_rescan_mutex) ...snip... Reported-by: Taku Izumi izumi.t...@jp.fujitsu.com Signed-off-by: Lin Feng linf...@cn.fujitsu.com Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com

[PATCH RESEND] pci-sysfs: replace mutex_lock with mutex_trylock to avoid potential deadlock situation

2013-01-17 Thread Gu Zheng
] ? kthread_freezable_should_stop+0x70/0x70 [81525bc0] ? gs_change+0x13/0x13 Reported-by: Taku Izumi izumi.t...@jp.fujitsu.com Signed-off-by: Lin Feng linf...@cn.fujitsu.com Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- drivers/pci/pci-sysfs.c | 42

Re: [PATCH 2/3] f2fs: add sysfs entries to select the gc policy

2013-08-04 Thread Gu Zheng
. The selection is mutually exclusive one approach will work at any point. If gc_idle = 0, then this option is disabled. Cc: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Namjae Jeon namjae.j...@samsung.com Signed-off-by: Pankaj Kumar pankaj...@samsung.com Reviewed-by: Gu Zheng guz.f

Re: [PATCH 1/3] f2fs: add sysfs support for controlling the gc_thread

2013-08-04 Thread Gu Zheng
gc_no_gc_sleep_time: Default Sleep time for GC in ms Cc: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Namjae Jeon namjae.j...@samsung.com Signed-off-by: Pankaj Kumar pankaj...@samsung.com Reviewed-by: Gu Zheng guz.f...@cn.fujitsu.com --- Documentation/ABI/testing/sysfs-fs-f2fs | 22

[PATCH] f2fs: move bio_private allocation out of f2fs_bio_alloc()

2013-07-24 Thread Gu Zheng
bio-bi_private is not always needed. As in the reading data path, end_read_io does not need bio_private for further using, so moving bio_private allocation out of f2fs_bio_alloc(). Alloc it in the submit_write_page(), and ignore it in the f2fs_readpage(). Signed-off-by: Gu Zheng guz.f

[PATCH] driver/vga16fb.c: remove the unused variable dev of function vga16fb_destroy()

2013-07-24 Thread Gu Zheng
Commit e21d2170f36602ae2708 removed the unnecessary platform_set_drvdata(), but left the variable dev unused, delete it. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- drivers/video/vga16fb.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/video/vga16fb.c b

Re: [PATCH] driver/vga16fb.c: remove the unused variable dev of function vga16fb_destroy()

2013-07-25 Thread Gu Zheng
On 07/25/2013 05:58 PM, Geert Uytterhoeven wrote: On Thu, Jul 25, 2013 at 5:37 AM, Gu Zheng guz.f...@cn.fujitsu.com wrote: Commit e21d2170f36602ae2708 removed the unnecessary platform_set_drvdata(), but left the variable dev unused, delete it. When referring to another commit, please also

[PATCH V2] driver/vga16fb.c: remove the unused variable dev of function vga16fb_destroy()

2013-07-25 Thread Gu Zheng
Commit e21d2170f36602ae2708 (video: remove unnecessary platform_set_drvdata()) removed the unnecessary platform_set_drvdata(), but left the variable dev unused, delete it. v2: Following Geert's suggestion to make change log easier reading. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com

Re: question about splice

2013-07-26 Thread Gu Zheng
Hi Jianpeng, On 07/26/2013 03:08 PM, majianpeng wrote: Hi all, I used splice and found a prolem(at least i call). The demo is: A:splice(regularfileA---pipe); B:splice(pipe---regularfileB) Before do B, we modify the data of regA which now in pipe. The data to regularfileB willbe

[PATCH RESEND] fs/bio-integrity: fix a potential mem leak

2013-07-28 Thread Gu Zheng
Free the bio_integrity_pool in the fail path of biovec_create_pool in function bioset_integrity_create(). Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/bio-integrity.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/bio-integrity.c b/fs/bio

[PATCH RESEND] f2fs: move bio_private allocation out of f2fs_bio_alloc()

2013-07-28 Thread Gu Zheng
bio-bi_private is not always needed. As in the reading data path, end_read_io does not need bio_private for further using, so moving bio_private allocation out of f2fs_bio_alloc(). Alloc it in the submit_write_page(), and ignore it in the f2fs_readpage(). Signed-off-by: Gu Zheng guz.f

Re: [PATCH 0/9] Add namespace support for syslog v2

2013-07-29 Thread Gu Zheng
Hi Rui, On 07/29/2013 10:31 AM, Rui Xiang wrote: This patchset introduces a system log namespace. It is the 2nd version. The link of the 1st version is http://lwn.net/Articles/525728/. In that version, syslog_ namespace was added into nsproxy and created through a new clone flag

Re: [PATCH 1/9] syslog_ns: add syslog_namespace and put/get_syslog_ns

2013-07-29 Thread Gu Zheng
Hi Rui, Refer to inline:). On 07/29/2013 10:31 AM, Rui Xiang wrote: Add a struct syslog_namespace which contains the necessary members for hanlding syslog and realize get_syslog_ns and put_syslog_ns API. Signed-off-by: Rui Xiang rui.xi...@huawei.com --- include/linux/syslog.h |

Re: [PATCH 2/9] syslog_ns: add syslog_ns into user_namespace

2013-07-29 Thread Gu Zheng
Hi Rui, On 07/29/2013 10:31 AM, Rui Xiang wrote: Add a syslog_ns pointer to user_namespace, and make syslog_ns per user_namespace, not global. Since syslog_ns is assigned to user_ns, we can have full capabilities in new user_ns to create a new syslog_ns. Signed-off-by: Rui Xiang

Re: [PATCH 4/9] syslog_ns: make syslog handling per namespace

2013-07-29 Thread Gu Zheng
Hi Rui, On 07/29/2013 10:31 AM, Rui Xiang wrote: This patch makes syslog buf and other fields per namespace. Here use ns-log_buf(log_buf_len, logbuf_lock, log_first_seq, logbuf_lock, and so on) fields instead of global ones to handle syslog. Syslog interfaces such as /dev/kmsg,

Re: [PATCH 2/9] syslog_ns: add syslog_ns into user_namespace

2013-07-29 Thread Gu Zheng
On 07/29/2013 05:54 PM, Gao feng wrote: On 07/29/2013 05:46 PM, Gu Zheng wrote: Hi Rui, On 07/29/2013 10:31 AM, Rui Xiang wrote: Add a syslog_ns pointer to user_namespace, and make syslog_ns per user_namespace, not global. Since syslog_ns is assigned to user_ns, we can have full

Re: [PATCH 7/9] syslog_ns: implement function for creating syslog ns

2013-07-29 Thread Gu Zheng
Hi Rui, On 07/29/2013 10:31 AM, Rui Xiang wrote: Add create_syslog_ns function to create a new ns. We must create a user_ns before create a new syslog ns. And then tie the new syslog_ns to current user_ns instead of original syslog_ns which comes from parent user_ns. Add a new syslog

Re: [PATCH 8/9] syslog_ns: implement ns_printk for specific syslog_ns

2013-07-29 Thread Gu Zheng
Hi Rui, On 07/29/2013 10:31 AM, Rui Xiang wrote: Add a new interface named ns_printk, and assign an patamater ns. Log which belong to a container can be printed by ns_printk. One question, with the syslog_ns used, do the log we print by *printk* in the host contains the log in each

Re: [PATCH 1/9] syslog_ns: add syslog_namespace and put/get_syslog_ns

2013-07-29 Thread Gu Zheng
On 07/29/2013 07:47 PM, Rui Xiang wrote: On 2013/7/29 17:40, Gu Zheng wrote: Hi Rui, Refer to inline:). Hi Gu, Thanks for your attention. On 07/29/2013 10:31 AM, Rui Xiang wrote: Add a struct syslog_namespace which contains the necessary members for hanlding syslog and realize

Re: [PATCH 7/9] syslog_ns: implement function for creating syslog ns

2013-07-29 Thread Gu Zheng
On 07/30/2013 11:39 AM, Rui Xiang wrote: On 2013/7/29 18:25, Gu Zheng wrote: Hi Rui, On 07/29/2013 10:31 AM, Rui Xiang wrote: Add create_syslog_ns function to create a new ns. We must create a user_ns before create a new syslog ns. And then tie the new syslog_ns to current user_ns

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-25 Thread Gu Zheng
/core.c.] Make the affected sysfs attributes in the driver core and ACPI core use read_lock_device_remove() and read_unlock_device_remove() as described above. Signed-off-by: Rafael J. Wysocki rafael.j.wyso...@intel.com Reported-by: Gu Zheng guz.f...@cn.fujitsu.com I'm sorry to forget

[PATCH] drivers/base/memory.c: introduce help macro to_memory_block

2013-08-26 Thread Gu Zheng
Introduce help macro to_memory_block to hide the conversion(device--memory_block), just clean up. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- drivers/base/memory.c | 27 --- 1 files changed, 12 insertions(+), 15 deletions(-) diff --git a/drivers/base/memory.c

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-26 Thread Gu Zheng
Hi Rafael, On 08/26/2013 10:43 PM, Rafael J. Wysocki wrote: On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 11:13:13 AM Gu Zheng wrote: Hi Rafael, Hi, On 08/26/2013 04:09 AM, Rafael J. Wysocki wrote: From: Rafael J. Wysocki rafael.j.wyso

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-26 Thread Gu Zheng
Hi Rafael, On 08/26/2013 10:43 PM, Rafael J. Wysocki wrote: On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 11:13:13 AM Gu Zheng wrote: Hi Rafael, Hi, On 08/26/2013 04:09 AM, Rafael J. Wysocki wrote: From: Rafael J. Wysocki rafael.j.wyso

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-26 Thread Gu Zheng
Hi Rafael, On 08/26/2013 11:02 PM, Rafael J. Wysocki wrote: On Monday, August 26, 2013 04:43:26 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 11:13:13 AM Gu Zheng wrote: Hi Rafael, [...] OK, so the patch below

Re: [PATCH] f2fs: fix omitting to update inode page

2013-08-26 Thread Gu Zheng
On 08/26/2013 08:28 PM, Jaegeuk Kim wrote: The f2fs_set_link updates its parent inode number, so we should sync this to the inode block. Otherwise, the data can be lost after sudden-power-off. Signed-off-by: Jaegeuk Kim jaegeuk@samsung.com --- fs/f2fs/namei.c | 1 + 1 file changed,

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-27 Thread Gu Zheng
Hi Rafael, On 08/26/2013 11:02 PM, Rafael J. Wysocki wrote: On Monday, August 26, 2013 04:43:26 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 11:13:13 AM Gu Zheng wrote: Hi Rafael, [...] OK, so the patch below

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-27 Thread Gu Zheng
Hi Toshi, On 08/28/2013 05:38 AM, Toshi Kani wrote: On Tue, 2013-08-27 at 17:21 +0800, Gu Zheng wrote: Hi Rafael, On 08/26/2013 11:02 PM, Rafael J. Wysocki wrote: On Monday, August 26, 2013 04:43:26 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki wrote

[PATCH RESEND] drivers/base/memory.c: introduce help macro to_memory_block

2013-08-28 Thread Gu Zheng
Introduce help macro to_memory_block to hide the conversion(device--memory_block), just clean up. Reviewed-by: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- drivers/base/memory.c | 29 - 1 files changed, 12

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-28 Thread Gu Zheng
Hi Rafael, On 08/28/2013 05:45 AM, Rafael J. Wysocki wrote: On Tuesday, August 27, 2013 02:36:44 PM Tejun Heo wrote: Hello, [...] I've thought about that a bit over the last several hours and I'm still thinking that that patch is a bit overkill, because it will trigger the

[PATCH] f2fs: fix a compound statement label error

2013-08-18 Thread Gu Zheng
From 685b72b66cb8ce019429b1958c91f346b260bc65 Mon Sep 17 00:00:00 2001 From: Gu Zheng guz.f...@cn.fujitsu.com Date: Mon, 19 Aug 2013 09:41:15 +0800 Subject: [PATCH] f2fs: fix a compound statement label error An error label at end of compound statement will occur if CONFIG_F2FS_STAT_FS disabled. fs

[PATCH] f2fs: use strncasecmp() simplify the string comparison

2013-08-22 Thread Gu Zheng
Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/namei.c | 12 +--- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 4e47518..106c0b4 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -83,21 +83,11 @@ static int

Re: [PATCH] ocfs2/refcounttree: add the missing NULL check of the return value of find_or_create_page()

2013-07-09 Thread Gu Zheng
On 07/10/2013 06:11 AM, Joel Becker wrote: On Mon, Jul 08, 2013 at 03:52:53PM +0800, Gu Zheng wrote: Add the missing NULL check of the return value of find_or_create_page() in function ocfs2_duplicate_clusters_by_page(). Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/ocfs2

Re: [PATCH 1/2] fs/anon_inode: Introduce a new lib function, anon_inode_getfile_private()

2013-07-11 Thread Gu Zheng
ping... On 07/08/2013 06:38 PM, Gu Zheng wrote: Introduce a new lib function anon_inode_getfile_private(), it creates a new file instance by hooking it up to an anonymous inode, and a dentry that describe the class of the file, similar to anon_inode_getfile(), but each file holds

Re: [PATCH 0/2] Add support to aio ring pages migration

2013-07-11 Thread Gu Zheng
ping... On 07/08/2013 06:38 PM, Gu Zheng wrote: Currently aio ring pages use get_user_pages() to allocate pages from movable zone,as discussed in thread https://lkml.org/lkml/2012/11/29/69, it is easy to pin user pages for a long time, which is fatal for memory hotplug/remove framework

Re: [PATCH 2/2] fs/aio: Add support to aio ring pages migration

2013-07-11 Thread Gu Zheng
ping... On 07/08/2013 06:38 PM, Gu Zheng wrote: As the aio job will pin the ring pages, that will lead to mem migrated failed. In order to fix this problem we use an anon inode to manage the aio ring pages, and setup the migratepage callback in the anon inode's address space, so

[PATCH] f2fs: introduce help function F2FS_NODE()

2013-07-15 Thread Gu Zheng
Introduce help function F2FS_NODE() to simplify the conversion of node_page to f2fs_node. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/data.c |2 +- fs/f2fs/dir.c |2 +- fs/f2fs/f2fs.h |9 +++-- fs/f2fs/file.c |2 +- fs/f2fs/inode.c|4

[PATCH] fs/f2fs: Code cleanup and simplify in func {find/add}_gc_inode

2013-06-20 Thread Gu Zheng
Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/gc.c | 17 + 1 files changed, 5 insertions(+), 12 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 1496159..0b8b439 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -314,28 +314,21 @@ static const struct

[PATCH] fs/jffs2: remove the unused paramters of function jffs2_{compress,decompress}

2013-07-16 Thread Gu Zheng
Remove the unused paramters of function jffs2_{compress,decompress}. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/jffs2/compr.c | 12 ++-- fs/jffs2/compr.h | 12 ++-- fs/jffs2/gc.c|2 +- fs/jffs2/read.c |2 +- fs/jffs2/write.c |2 +- 5 files

[PATCH RESEND 0/2] Add support to aio ring pages migration

2013-07-16 Thread Gu Zheng
/lists/linux-fsdevel/msg66014.html Gu Zheng (2): fs/anon_inode: Introduce a new lib function anon_inode_getfile_private() fs/aio: Add support to aio ring pages migration fs/aio.c| 120 +++ fs/anon_inodes.c| 66

[PATCH RESEND 2/2] fs/aio: Add support to aio ring pages migration

2013-07-16 Thread Gu Zheng
mem node safely. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Benjamin LaHaise b...@kvack.org --- fs/aio.c| 120 ++ include/linux/migrate.h |3 + mm/migrate.c|2 +- 3 files changed, 113 insertions

[PATCH RESEND 1/2] fs/anon_inode: Introduce a new lib function anon_inode_getfile_private()

2013-07-16 Thread Gu Zheng
a private anon file will benefit from this change. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Benjamin LaHaise b...@kvack.org --- fs/anon_inodes.c| 66 +++ include/linux/anon_inodes.h |3 ++ 2 files changed, 69 insertions(+), 0

Re: [PATCH RESEND 1/2] fs/anon_inode: Introduce a new lib function anon_inode_getfile_private()

2013-07-16 Thread Gu Zheng
Hi Ben, On 07/16/2013 09:16 PM, Benjamin LaHaise wrote: On Tue, Jul 16, 2013 at 05:56:12PM +0800, Gu Zheng wrote: Introduce a new lib function anon_inode_getfile_private(), it creates a new file instance by hooking it up to an anonymous inode, and a dentry that describe the class

Re: [PATCH RESEND 2/2] fs/aio: Add support to aio ring pages migration

2013-07-16 Thread Gu Zheng
Hi Ben, On 07/16/2013 09:34 PM, Benjamin LaHaise wrote: On Tue, Jul 16, 2013 at 05:56:16PM +0800, Gu Zheng wrote: As the aio job will pin the ring pages, that will lead to mem migrated failed. In order to fix this problem we use an anon inode to manage the aio ring pages, and setup

[PATCH V2 2/2] fs/aio: Add support to aio ring pages migration

2013-07-17 Thread Gu Zheng
mem node safely. v1-v2: Fix build failed issue if CONFIG_MIGRATION disabled. Fix some minor issues under Benjamin's comments. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/aio.c| 116 +++ include/linux

Re: [PATCH V2 2/2] fs/aio: Add support to aio ring pages migration

2013-07-17 Thread Gu Zheng
Hi Ben, On 07/17/2013 09:44 PM, Benjamin LaHaise wrote: On Wed, Jul 17, 2013 at 05:22:30PM +0800, Gu Zheng wrote: As the aio job will pin the ring pages, that will lead to mem migrated failed. In order to fix this problem we use an anon inode to manage the aio ring pages, and setup

[PATCH RESEND] fs/jffs2: remove the unused paramters of function jffs2_{compress,decompress}

2013-07-19 Thread Gu Zheng
Remove the unused paramters of function jffs2_{compress,decompress}. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/jffs2/compr.c | 12 ++-- fs/jffs2/compr.h | 12 ++-- fs/jffs2/gc.c|2 +- fs/jffs2/read.c |4 +++- fs/jffs2/write.c |2 +- 5 files

[PATCH ] lib/crc32: update the comments of, crc32_{be,le}_generic()

2013-07-19 Thread Gu Zheng
Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- lib/crc32.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index 072fbd8..4722659 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -131,11 +131,14 @@ crc32_body(u32 crc, unsigned

[PATCH] f2fs: add the missing delection of orphan inode entry in write_orphan_inodes()

2013-07-19 Thread Gu Zheng
After writing orphan inode entry in jornal block, we need to delete each entry from the orphan entry list, and release them. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/fs/f2fs/checkpoint.c

[PATCH] f2fs: use list_for_each rather than list_for_each_safe, in remove_orphan_inode()

2013-07-19 Thread Gu Zheng
As we remove the target single node, so list_for_each is enought, in order to clean up, we use list_for_each_entry instead. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/checkpoint.c b

Re: [PATCH aio-next] aio: fix race in ring buffer page lookup introduced by page migration support

2013-09-09 Thread Gu Zheng
Hi Ben, Al, On 09/10/2013 12:02 AM, Benjamin LaHaise wrote: Hi Al, Gu, I've added this patch to my tree at git://git.kvack.org/~bcrl/aio-next.git to fix the get_user_pages() issue introduced by Gu's changes in the page migration patch. Thanks Al for spotting this. Thanks very much for

Re: [f2fs-dev] [PATCH] f2fs: optimize fs_lock for better performance

2013-09-10 Thread Gu Zheng
Hi Jaegeuk, On 09/10/2013 08:59 AM, Jaegeuk Kim wrote: Hi, 2013-09-07 (토), 08:00 +, Chao Yu: Hi Knize, Thanks for your reply, I think it's actually meaningless that it's being named after spin_lock, it's better to rename this spinlock to round_robin_lock. This patch can

Re: [f2fs-dev][PATCH] f2fs: optimize fs_lock for better performance

2013-09-10 Thread Gu Zheng
Hi Jaegeuk, On 09/10/2013 08:52 AM, Jaegeuk Kim wrote: Hi, At first, thank you for the report and please follow the email writing rules. :) Anyway, I agree to the below issue. One thing that I can think of is that we don't need to use the spin_lock, since we don't care about the exact

Re: [f2fs-dev][PATCH] f2fs: optimize fs_lock for better performance

2013-09-10 Thread Gu Zheng
Hi Jaegeuk, Chao, On 09/10/2013 08:52 AM, Jaegeuk Kim wrote: Hi, At first, thank you for the report and please follow the email writing rules. :) Anyway, I agree to the below issue. One thing that I can think of is that we don't need to use the spin_lock, since we don't care about the

Re: [f2fs-dev][PATCH] f2fs: optimize fs_lock for better performance

2013-09-11 Thread Gu Zheng
Hi Chao, On 09/12/2013 10:40 AM, 俞超 wrote: Hi Gu -Original Message- From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] Sent: Wednesday, September 11, 2013 1:38 PM To: jaegeuk@samsung.com Cc: chao2...@samsung.com; shu@samsung.com; linux-fsde...@vger.kernel.org; linux-kernel

[f2fs-dev][PATCH V2] f2fs: optimize fs_lock for better performance

2013-09-11 Thread Gu Zheng
-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/f2fs.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 608f0df..7fd99d8 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -544,15 +544,15 @@ static inline void mutex_unlock_all

[PATCH] f2fs: add a wait step when submit bio with {READ,WRITE}_SYNC

2013-07-30 Thread Gu Zheng
-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c |1 - fs/f2fs/data.c | 39 +-- fs/f2fs/node.c |1 - fs/f2fs/recovery.c |2 -- fs/f2fs/segment.c|2 +- 5 files changed, 18 insertions(+), 27 deletions(-) diff --git

Re: [PATCH] f2fs: add a wait step when submit bio with {READ,WRITE}_SYNC

2013-07-30 Thread Gu Zheng
, since it is just for write priority, not for synchronization of the file system. Got it, thanks for your explanation.:) Best regards, Gu Thanks, 2013-07-30 (화), 18:06 +0800, Gu Zheng: When we submit bio with READ_SYNC or WRITE_SYNC, we need to wait a moment for the io completion, current

Re: [PATCH] fbdev: fix build warning in vga16fb.c

2013-07-30 Thread Gu Zheng
Hoho, Tomi has applied the patch from Lius to fix this warning. And this is the sixth patch to fix the same issue since last week. Thanks, Gu On 07/31/2013 11:21 AM, Xishi Qiu wrote: When building v3.11-rc3, I get the following warning: ... drivers/video/vga16fb.c: In function

Re: [PATCH RESEND] fs/bio-integrity: fix a potential mem leak

2013-07-31 Thread Gu Zheng
cc akpm On 07/29/2013 09:49 AM, Gu Zheng wrote: Free the bio_integrity_pool in the fail path of biovec_create_pool in function bioset_integrity_create(). Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/bio-integrity.c |9 + 1 files changed, 5 insertions(+), 4

Re: [PATCH] f2fs: add a wait step when submit bio with {READ,WRITE}_SYNC

2013-07-31 Thread Gu Zheng
On 07/31/2013 06:06 PM, Jaegeuk Kim wrote: 2013-07-31 (수), 09:59 +0800, Gu Zheng: Hi Kim, On 07/30/2013 08:29 PM, Jaegeuk Kim wrote: Hi Gu, The original read flow was to avoid redandunt lock/unlock_page() calls. Right, this can gain better read performance. But is the wait step after

Re: [PATCH 1/2] f2fs: add sysfs support for controlling the gc_thread

2013-07-31 Thread Gu Zheng
Hi Jeon, On 07/31/2013 10:33 PM, Namjae Jeon wrote: From: Namjae Jeon namjae.j...@samsung.com Add sysfs entries to control the timing parameters for f2fs gc thread. Various Sysfs options introduced are: gc_min_sleep_time: Min Sleep time for GC in ms gc_max_sleep_time: Max Sleep time

Re: [PATCH 2/2] f2fs: add sysfs entries to select the gc policy

2013-07-31 Thread Gu Zheng
Hi Jeon, On 07/31/2013 10:33 PM, Namjae Jeon wrote: From: Namjae Jeon namjae.j...@samsung.com Add sysfs entries namely gc_long_idle and gc_short_idle to control the gc policy. Where long idle corresponds to selecting a cost benefit approach, while short idle corresponds to selecting a

Re: [PATCH] f2fs: fix handling orphan inodes

2013-08-01 Thread Gu Zheng
On 08/01/2013 03:58 PM, Jaegeuk Kim wrote: This patch fixes mishandling of the sbi-n_orphans variable. If users request lots of f2fs_unlink(), check_orphan_space() could be contended. In such the case, sbi-n_orphans can be read incorrectly so that f2fs_unlink() would fall into the wrong

Re: [PATCH 1/2] f2fs: add sysfs support for controlling the gc_thread

2013-08-01 Thread Gu Zheng
On 08/02/2013 09:19 AM, Namjae Jeon wrote: diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 78777cd..63813be 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -430,6 +430,10 @@ struct f2fs_sb_info { #endif unsigned int last_victim[2];/* last victim segment # */

[RESEND PATCH 2/2] staging/olpc_docn: reorder the lock sequence to avoid potential dead lock

2013-11-05 Thread Gu Zheng
The lock sequence of dcon_blank_fb(fb_info-lock --- console_lock) is against with the one of console_callback(console_lock --- fb_info-lock), it'll lead to a potential dead lock, so reorder the lock sequence of dcon_blank_fb to avoid the potential dead lock. Signed-off-by: Gu Zheng guz.f

[RESEND PATCH 1/2] fb: reorder the lock sequence to fix potential dead lock

2013-11-05 Thread Gu Zheng
(fb_info-lock); [ 601.079000] *** DEADLOCK *** so we reorder the lock sequence the same as it in console_callback() to avoid this issue. And following Tomi's suggestion, fix these similar issues all in fb subsystem. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- drivers/video/fbmem.c

[RESEND PATCH] fs/buffer.c: exit if already confirmed page has dirty and writeback buffers

2013-11-05 Thread Gu Zheng
Stop the loop of iterating bh if we have confirmed page has dirty and writeback buffers. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/buffer.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index 6024877..519cc5c 100644 --- a/fs

Re: [RESEND PATCH 2/2] staging/olpc_docn: reorder the lock sequence to avoid potential dead lock

2013-11-05 Thread Gu Zheng
Hi Dan, On 11/05/2013 07:02 PM, Dan Carpenter wrote: On Tue, Nov 05, 2013 at 06:01:00PM +0800, Gu Zheng wrote: The lock sequence of dcon_blank_fb(fb_info-lock --- console_lock) is against with the one of console_callback(console_lock --- fb_info-lock), it'll lead to a potential dead lock

Re: [f2fs-dev] [PATCH] f2fs: avoid to use a NULL point in destroy_segment_manager

2013-11-05 Thread Gu Zheng
On 11/06/2013 09:12 AM, Chao Yu wrote: A NULL point should avoid to be used in destroy_segment_manager after allocating memory fail for f2fs_sm_info. Though without this patch it still can work well, because if it failed to allocate f2fs_sm_info, the sit_info, free_info... all were NULL, and

Re: [f2fs-dev] [PATCH] f2fs: avoid to use a NULL point in destroy_segment_manager

2013-11-05 Thread Gu Zheng
On 11/06/2013 01:10 PM, Chao Yu wrote: Hi Gu, -Original Message- From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] Sent: Wednesday, November 06, 2013 11:41 AM To: Chao Yu Cc: ???; linux-fsde...@vger.kernel.org; linux-kernel@vger.kernel.org; linux-f2fs-de...@lists.sourceforge.net

Re: [RESEND PATCH] fs/buffer.c: exit if already confirmed page has dirty and writeback buffers

2013-11-08 Thread Gu Zheng
Hi Jan, On 11/07/2013 07:44 PM, Jan Kara wrote: On Tue 05-11-13 18:02:03, Gu Zheng wrote: Stop the loop of iterating bh if we have confirmed page has dirty and writeback buffers. Thanks for the patch. What I'm somewhat missing here is a motivation of the patch. For the common case where

Re: [f2fs-dev][PATCH RESEND] f2fs: avoid allocating failure in bio_alloc

2013-09-15 Thread Gu Zheng
Hi Chao, On 09/13/2013 09:27 PM, Chao Yu wrote: This patch add macro MAX_BIO_BLOCKS to limit value of npages in f2fs_bio_alloc, it can avoid allocating failure in bio_alloc caused by npages is larger than UIO_MAXIOV. As I know bio_alloc is based of *fs_bio_set* pool, without the limitation

Re: [f2fs-dev][PATCH RESEND] f2fs: avoid allocating failure in bio_alloc

2013-09-15 Thread Gu Zheng
Hi Chao, On 09/16/2013 11:26 AM, Chao Yu wrote: Hi Gu -Original Message- From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] Sent: Monday, September 16, 2013 10:09 AM To: Chao Yu Cc: Kim Jaegeuk; linux-f2fs-de...@lists.sourceforge.net; linux-fsde...@vger.kernel.org; linux-kernel

[RFC PATCH] fb: reorder the lock sequence to fix a potential lockdep

2013-10-20 Thread Gu Zheng
(fb_info-lock); [ 601.079000] *** DEADLOCK *** so we reorder the lock sequence the same as it in console_callback() to avoid this issue. Not very sure this change is suitable, any comments is welcome. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- drivers/video/fbmem.c | 50

[PATCH] f2fs: introduce f2fs_kmem_cache_alloc to hide the unfailed kmem cache allocation

2013-10-21 Thread Gu Zheng
Introduce the unfailed version of kmem_cache_alloc named f2fs_kmem_cache_alloc to hide the retry routine and make the code a bit cleaner. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c | 26 +++--- fs/f2fs/f2fs.h | 13 + fs/f2fs

[PATCH] f2fs: delete and free dirty dir freeing inode entry when sync dirty dir inodes

2013-10-21 Thread Gu Zheng
. So add the delete and free step to fix it. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 8d16071..f61838f 100644 --- a/fs/f2fs

[f2fs-dev][PATCH] f2fs: fix a potential out of range issue

2013-11-26 Thread Gu Zheng
Fix a potential out of range issue introduced by commit: 22fb72225a f2fs: simplify write_orphan_inodes for better readable Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/checkpoint.c b

Re: [PATCH] f2fs: remove the own bi_private allocation

2013-12-01 Thread Gu Zheng
. - Since we have no dependancies to remove bi_private now, let's just use bi_private pointer as the completion pointer. Cool, looks good to me.:) Signed-off-by: Jaegeuk Kim jaegeuk@samsung.com Reviewed-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/segment.c | 43

Re: [PATCH] f2fs: refactor bio-related operations

2013-12-01 Thread Gu Zheng
to submit the merged bio. 4. Change f2fs_readpage to f2fs_submit_page_bio. 5. Introduce f2fs_submit_page_mbio to integrate previous submit_read_page and submit_write_page. Signed-off-by: Jaegeuk Kim jaegeuk@samsung.com Reviewed-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs

Re: GPF in aio_migratepage

2013-12-02 Thread Gu Zheng
Hi Kristian, Dave, Could you please help to check whether the following patch can fix this issue? Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/aio.c | 28 ++-- 1 files changed, 10 insertions(+), 18 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 08159ed

[PATCH] f2fs: avoid wait if IO end up when do_checkpoint for better performance

2013-10-14 Thread Gu Zheng
on, and in the end IO path, wake up checkpoint task when IO ends up. Thanks to Yuan Zhong's pre work about this problem. Reported-by: Yuan Zhong yuan.mark.zh...@samsung.com Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c | 11 +-- fs/f2fs/f2fs.h |1 + fs/f2fs

[PATCH RESEND] f2fs: introduce function read_raw_super_block()

2013-10-14 Thread Gu Zheng
Introduce function read_raw_super_block() to hide reading raw super block and the retry routine if the first sb is invalid. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/super.c | 54 +- 1 files changed, 33 insertions(+), 21

Re: [RESEND PATCH 1/2] fb: reorder the lock sequence to fix potential dead lock

2013-11-11 Thread Gu Zheng
Hi Tomi, On 11/11/2013 09:59 PM, Tomi Valkeinen wrote: On 2013-11-05 12:00, Gu Zheng wrote: Following commits: 50e244cc79 fb: rework locking to fix lock ordering on takeover e93a9a8687 fb: Yet another band-aid for fixing lockdep mess 054430e773 fbcon: fix locking harder reworked locking

Re: [f2fs-dev] [PATCH 2/2] f2fs: read contiguous sit entry pages by merging for mount performance

2013-11-12 Thread Gu Zheng
Hi Yu, On 11/12/2013 01:18 PM, Chao Yu wrote: Previously we read sit entries page one by one, this method lost the chance of reading contiguous page together. So we read pages as contiguous as possible for better mount performance. Signed-off-by: Chao Yu chao2...@samsung.com ---

Re: [f2fs-dev] [PATCH 1/2] f2fs: add a new function to support for merging contiguous read

2013-11-12 Thread Gu Zheng
On 11/12/2013 01:15 PM, Chao Yu wrote: For better read performance, we add a new function to support for merging contiguous read as the one for write. Nice shot! Signed-off-by: Chao Yu chao2...@samsung.com Acked-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/data.c | 45

Re: [f2fs-dev] [PATCH 2/2] f2fs: read contiguous sit entry pages by merging for mount performance

2013-11-14 Thread Gu Zheng
Hi Yu, On 11/13/2013 04:10 PM, Chao Yu wrote: Hi Gu, -Original Message- From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] Sent: Wednesday, November 13, 2013 11:39 AM To: Chao Yu Cc: ???; linux-fsde...@vger.kernel.org; linux-kernel@vger.kernel.org; linux-f2fs-de

[PATCH] f2fs: use mutex rather than the rw_sem

2013-11-18 Thread Gu Zheng
Use mutex rather than the rw_sem to protect bio related fields, because it's needless to take the read_sem in the read path. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/data.c|4 fs/f2fs/f2fs.h|2 +- fs/f2fs/segment.c |8 fs/f2fs/super.c

Re: [PATCH 2/2] f2fs: use sbi-wr_mutex for write bios

2013-11-18 Thread Gu Zheng
Hi Kim, On 11/18/2013 05:12 PM, Jaegeuk Kim wrote: This patch removes an unnecessary semaphore (i.e., sbi-bio_sem). There is no reason to use the semaphore when f2fs submits read and write IOs. Instead, let's use a write mutex and cover the sbi-bio[] by the lock. My god, I just sent out an

Re: [f2fs-dev] [PATCH V2 1/2] f2fs: add a new function to support for merging contiguous read

2013-11-18 Thread Gu Zheng
as the one for write. Please consider 80 columns for the description. I cannot fix this at every time though. :( Got it, sorry about my carelessness in previous patch. v1--v2: o add declarations here as Gu Zheng suggested. Signed-off-by: Chao Yu chao2...@samsung.com Acked-by: Gu Zheng

Re: [f2fs-dev] [PATCH V2 2/2] f2fs: read contiguous sit entry pages by merging for mount performance

2013-11-18 Thread Gu Zheng
merge judgements/use 'Continue' or 'Break' instead of 'Goto' as Gu Zheng suggested. o add mark_page_accessed () before release page to delay VM reclaiming them. Signed-off-by: Chao Yu chao2...@samsung.com --- fs/f2fs/segment.c | 108 - fs

[PATCH 0/5] f2fs: some minor cleanups and logic fixes

2013-11-19 Thread Gu Zheng
Gu Zheng (5): f2fs: convert remove_inode_page to void f2fs: convert dev_valid_block_count to void f2fs: convert inc/dec_valid_node_count to inc/dec one count f2fs: simplify write_orphan_inodes for better readable f2fs: move the list_head initialization into the lock protection

[PATCH 4/5] f2fs: simplify write_orphan_inodes for better readable

2013-11-19 Thread Gu Zheng
Simplify write_orphan_inodes for better readable. Because we hold the orphan_inode_mutex, so it's safe to use list_for_each_entry instead of list_for_each_safe. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c | 38 ++ 1 files

[PATCH 2/5] f2fs: convert dev_valid_block_count to void

2013-11-19 Thread Gu Zheng
Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/f2fs.h |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 94fbec3..d0c6738 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -585,7 +585,7 @@ static inline bool

[PATCH 5/5] f2fs: move the list_head initialization into the lock protection region

2013-11-19 Thread Gu Zheng
Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index f884589..1de70cc 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c

Re: [f2fs-dev] [PATCH V2 2/2] f2fs: read contiguous sit entry pages by merging for mount performance

2013-11-20 Thread Gu Zheng
Hi Yu, On 11/20/2013 01:37 PM, Chao Yu wrote: Hi Gu, -Original Message- From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] Sent: Monday, November 18, 2013 7:16 PM To: Chao Yu Cc: '???'; linux-fsde...@vger.kernel.org; linux-kernel@vger.kernel.org; linux-f2fs-de

  1   2   3   4   5   6   7   8   9   >