From: Namjae Jeon <linkinjeon@gmail.com>
To: jaegeuk.kim@samsung.com
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
Namjae Jeon <linkinjeon@gmail.com>,
Namjae Jeon <namjae.jeon@samsung.com>,
Amit Sahrawat <a.sahrawat@samsung.com>
Subject: [PATCH] f2fs: fix to name f2fs GC task as per partition instead of per device
Date: Tue, 5 Feb 2013 23:24:53 +0900 [thread overview]
Message-ID: <1360074293-8252-1-git-send-email-linkinjeon@gmail.com> (raw)
From: Namjae Jeon <namjae.jeon@samsung.com>
After the commit 2184ad190a79ae2b40b5f5db1fbde5c22db6d310, it allowed
for naming GC threads based on the device.
i.e., if we have F2FS formatted partition in different devices - we will
have their GC thread names after the device. But, when we have a case like
2 or more partitions on the same device having F2FS filesystem.
In that case we are not able to differentiate between the GC threads.
So, to differentiate at all possible levels we can use the major/minor of
the device to have unique identification in the name.
Before patch:
root 9726 0.0 0.0 0 0 ? S 14:32 0:00 [f2fs_gc-8:48]
root 9736 0.0 0.0 0 0 ? S 14:32 0:00 [f2fs_gc-8:16]
root 9892 0.0 0.0 0 0 ? S 14:33 0:00 [f2fs_gc-8:32]
root 9907 0.0 0.0 0 0 ? S 14:34 0:00 [f2fs_gc-8:32]
After Patch:
root 16756 0.0 0.0 0 0 ? S 14:57 0:00 [f2fs_gc-8:18]
root 16765 0.0 0.0 0 0 ? S 14:57 0:00 [f2fs_gc-8:19]
root 16806 0.0 0.0 0 0 ? S 14:58 0:00 [f2fs_gc-8:34]
root 16817 0.0 0.0 0 0 ? S 14:58 0:00 [f2fs_gc-8:52]
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
---
fs/f2fs/gc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 742135a..b0c1f8c 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -91,6 +91,7 @@ static int gc_thread_func(void *data)
int start_gc_thread(struct f2fs_sb_info *sbi)
{
struct f2fs_gc_kthread *gc_th;
+ dev_t dev = sbi->sb->s_bdev->bd_dev;
if (!test_opt(sbi, BG_GC))
return 0;
@@ -101,7 +102,7 @@ int start_gc_thread(struct f2fs_sb_info *sbi)
sbi->gc_thread = gc_th;
init_waitqueue_head(&sbi->gc_thread->gc_wait_queue_head);
sbi->gc_thread->f2fs_gc_task = kthread_run(gc_thread_func, sbi,
- "f2fs_gc-%s", dev_name(sbi->sb->s_bdi->dev));
+ "f2fs_gc-%u:%u", MAJOR(dev), MINOR(dev));
if (IS_ERR(gc_th->f2fs_gc_task)) {
kfree(gc_th);
sbi->gc_thread = NULL;
--
1.7.9.5
next reply other threads:[~2013-02-05 14:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-05 14:24 Namjae Jeon [this message]
2013-02-06 4:41 ` [PATCH] f2fs: fix to name f2fs GC task as per partition instead of per device Jaegeuk Kim
2013-02-06 4:59 ` Namjae Jeon
2013-02-06 9:21 ` Jaegeuk Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1360074293-8252-1-git-send-email-linkinjeon@gmail.com \
--to=linkinjeon@gmail.com \
--cc=a.sahrawat@samsung.com \
--cc=jaegeuk.kim@samsung.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namjae.jeon@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).