Re: [PATCH 1/2] nilfs2: add nilfs_sufile_trim_fs to trim clean segs

2014-02-20 Thread Ryusuke Konishi
On Wed, 19 Feb 2014 07:36:58 +0100, Andreas Rohner wrote: > On 2014-02-18 19:37, Ryusuke Konishi wrote: >> On Mon, 17 Feb 2014 23:39:51 +0100, Andreas Rohner wrote: >> >> Please try to compile this patch both for 32-bit kernel and 64-bit >> kernel to test if the patch

Re: [PATCH 1/2] nilfs2: add nilfs_sufile_trim_fs to trim clean segs

2014-02-18 Thread Ryusuke Konishi
return ret; > +} > + > +/** > * nilfs_sufile_read - read or get sufile inode > * @sb: super block instance > * @susize: size of a segment usage entry > diff --git a/fs/nilfs2/sufile.h b/fs/nilfs2/sufile.h > index e84bc5b..2434abd 100644 > --- a/fs/nilfs2/sufile.h > +++ b/fs/nilfs2/sufile.h >

Re: [PATCH 1/2] nilfs2: add nilfs_sufile_trim_fs to trim clean segs

2014-02-17 Thread Ryusuke Konishi
On Mon, 17 Feb 2014 12:53:54 +0100, Andreas Rohner wrote: > On 2014-02-17 12:21, Ryusuke Konishi wrote: >> On Mon, 17 Feb 2014 11:34:16 +0100, Andreas Rohner wrote: >>> On 2014-02-17 11:06, Ryusuke Konishi wrote: >>>> On Mon, 17 Feb 2014 10:17:57 +0100, Andreas Rohner

Re: [PATCH 1/2] nilfs2: add nilfs_sufile_trim_fs to trim clean segs

2014-02-17 Thread Ryusuke Konishi
On Mon, 17 Feb 2014 12:04:52 +0100, Andreas Rohner wrote: > On 2014-02-17 11:42, Ryusuke Konishi wrote: >> On Mon, 17 Feb 2014 10:06:56 +0100, Andreas Rohner wrote: >>> Hi Ryusuke, >>> >>> On 2014-02-17 04:00, Ryusuke Konishi wrote: >>>>> +

Re: [PATCH 1/2] nilfs2: add nilfs_sufile_trim_fs to trim clean segs

2014-02-17 Thread Ryusuke Konishi
On Mon, 17 Feb 2014 11:34:16 +0100, Andreas Rohner wrote: > On 2014-02-17 11:06, Ryusuke Konishi wrote: >> On Mon, 17 Feb 2014 10:17:57 +0100, Andreas Rohner wrote: >>> On 2014-02-17 04:00, Ryusuke Konishi wrote: >>>>> + if (end > nilfs->ns_nsegments) &g

Re: [PATCH 1/2] nilfs2: add nilfs_sufile_trim_fs to trim clean segs

2014-02-17 Thread Ryusuke Konishi
On Mon, 17 Feb 2014 10:06:56 +0100, Andreas Rohner wrote: > Hi Ryusuke, > > On 2014-02-17 04:00, Ryusuke Konishi wrote: >>> + segnum >= nilfs->ns_nsegments || >> >> This is bad too, because userland programs usually don't know the >> s

Re: [PATCH 1/2] nilfs2: add nilfs_sufile_trim_fs to trim clean segs

2014-02-17 Thread Ryusuke Konishi
On Mon, 17 Feb 2014 10:17:57 +0100, Andreas Rohner wrote: > On 2014-02-17 04:00, Ryusuke Konishi wrote: >>> + if (end > nilfs->ns_nsegments) >>> + end = nilfs->ns_nsegments; >> >> Yes, this adjustment is what we should do here, but 'end&#

Re: [PATCH 1/2] nilfs2: add nilfs_sufile_trim_fs to trim clean segs

2014-02-16 Thread Ryusuke Konishi
On Mon, 17 Feb 2014 12:00:00 +0900 (JST), Ryusuke Konishi wrote: > Hi Andreas, > On Sat, 15 Feb 2014 14:34:25 +0100, Andreas Rohner wrote: >> +segnum >= nilfs->ns_nsegments || > > This is bad too, because userland programs usually don't know the > segm

Re: [PATCH 2/2] nilfs2: add FITRIM ioctl support for nilfs2

2014-02-16 Thread Ryusuke Konishi
> + struct the_nilfs *nilfs = inode->i_sb->s_fs_info; > + struct request_queue *q = bdev_get_queue(nilfs->ns_bdev); > + struct fstrim_range range; > + int ret = 0; This initialization is unnecessary. Other looks OK to me. Regards, Ryusuke Konishi

Re: [PATCH 1/2] nilfs2: add nilfs_sufile_trim_fs to trim clean segs

2014-02-16 Thread Ryusuke Konishi
: > + range->len = trimmed << nilfs->ns_blocksize_bits; > + return ret; > +} > + > +/** > * nilfs_sufile_read - read or get sufile inode > * @sb: super block instance > * @susize: size of a segment usage entry > diff --git a/fs/nilfs2/sufile.h b/fs/

[PATCH] lssu: fix format-security warning at lssu_print_header()

2014-02-14 Thread Ryusuke Konishi
Fix the following gcc warning on some platforms: lssu.c: In function 'lssu_print_header': lssu.c:127:2: warning: format not a string literal and no format arguments [-Wformat-security] printf(lssu_format[disp_mode].header); ^ Signed-off-by: Ryusuke Konishi --- bin/lss

[PATCH 06/10] nilfs-utils: remove unnecessary parentheses from return statements

2014-02-13 Thread Ryusuke Konishi
fs-resize.c:479: + return (snp - segnumv); /* return the number of found segments */ ERROR: return is not a function, parentheses are not required #509: FILE: nilfs-resize/nilfs-resize.c:509: + return (snp - segnumv); /* return the number of found segments */ S

[PATCH 01/10] nilfs-utils: fix order of storage class specifiers

2014-02-13 Thread Ryusuke Konishi
declaration #707: FILE: nilfs-resize/nilfs-resize.c:707: + const static struct timespec retry_interval = { 0, 5 }; Signed-off-by: Ryusuke Konishi --- bin/chcp.c |2 +- bin/dumpseg.c|2 +- bin/lscp.c |2

[PATCH 10/10] nilfs-utils: remove unnecessary externs

2014-02-13 Thread Ryusuke Konishi
be avoided in .c files #105: FILE: mount/umount.nilfs2.c:105: +extern int optind; Signed-off-by: Ryusuke Konishi --- sbin/mkfs/mkfs.c |3 --- sbin/mount/mount.nilfs2.c |3 --- sbin/mount/umount.nilfs2.c |3 --- 3 files changed, 9 deletions(-) diff --git a/sbin/mkfs

[PATCH 02/10] nilfs-utils: insert backslash between lines splitting quoted string

2014-02-13 Thread Ryusuke Konishi
"\n" WARNING: quoted string split across lines #288: FILE: nilfs-tune/nilfs-tune.c:288: + sprintf(buf, "%02x%02x%02x%02x-%02x%02x-%02x%02x-" + "%02x%02x-%02x%02x%02x%02x%02x%02x", uuid[0], uuid[1], WARNING: quoted string split across lines #527: FILE: nilfs-t

[PATCH 05/10] nilfs-utils: do not initialize static or global variables to 0 or NULL

2014-02-13 Thread Ryusuke Konishi
*/ Signed-off-by: Ryusuke Konishi --- bin/lscp.c |2 +- bin/rmcp.c |4 ++-- sbin/mkfs/mkfs.c | 16 sbin/mount/fstab.c | 14 +++--- sbin/mount/mount.nilfs2.c| 14 +++--- sbin

[PATCH 0/10] nilfs-utils: correct coding style issues

2014-02-13 Thread Ryusuke Konishi
few false positives. Ryusuke Konishi -- Ryusuke Konishi (10): nilfs-utils: fix order of storage class specifiers nilfs-utils: insert backslash between lines splitting quoted string nilfs-utils: do not indent labels nilfs-utils: remove unnecessary whitespace before quote

[PATCH 04/10] nilfs-utils: remove unnecessary whitespace before quoted newlines

2014-02-13 Thread Ryusuke Konishi
kfs/mkfs.c:1167: + " [-L volume-label] [-m reserved-segments-percentage] \n" WARNING: unnecessary whitespace before a quoted newline #1168: FILE: mkfs/mkfs.c:1168: + " [-O feature[,...]] \n" Signed-off-by: Ryusuke Konishi --- sbin/mkfs

[PATCH 03/10] nilfs-utils: do not indent labels

2014-02-13 Thread Ryusuke Konishi
/mount_mntent.c:58: + next: Signed-off-by: Ryusuke Konishi --- bin/lssu.c|2 +- sbin/cleanerd/cleanerd.c |2 +- sbin/mount/mount_mntent.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/lssu.c b/bin/lssu.c index add7252..d19f7ba 100644 --- a/bin

[PATCH 08/10] mount/sundires.c: fix indent

2014-02-13 Thread Ryusuke Konishi
line #47: FILE: mount/sundries.c:47: + strncpy(t, s, n);$ WARNING: please, no spaces at the start of a line #48: FILE: mount/sundries.c:48: + t[n] = 0;$ WARNING: please, no spaces at the start of a line #50: FILE: mount/sundries.c:50: + return t;$ ... Signed-off-by: Ryusu

[PATCH 07/10] nilfs-utils: remove spaces between function name and open parenthesis

2014-02-13 Thread Ryusuke Konishi
+char *canonicalize (const char *path); WARNING: space prohibited between function name and open parenthesis '(' #29: FILE: mount/sundries.h:29: +void error (const char *fmt, ...); WARNING: space prohibited between function name and open parenthesis '(' #30: FILE: mount/

[PATCH 09/10] nilfs-utils: add missing space chars

2014-02-13 Thread Ryusuke Konishi
ERROR: spaces required around that '=' (ctx:VxV) #328: FILE: mount/mount_opts.c:328: + for (p=opts, opt=NULL; p && *p; p++) { ^ ERROR: spaces required around that '=' (ctx:VxV) #328: FILE: mount/mount_opts.c:328: + for (p=opts, o

Re: [PATCH v2 1/1] nilfs2: add mount option that reduces super block writes

2014-02-11 Thread Ryusuke Konishi
On Wed, 12 Feb 2014 09:58:31 +0900 (JST), Ryusuke Konishi wrote: > On Tue, 11 Feb 2014 20:58:45 +0100, Andreas Rohner wrote: >> On 2014-02-11 19:11, Ryusuke Konishi wrote: >>> On Tue, 11 Feb 2014 15:07:48 +0100, Andreas Rohner wrote: >>> Honestly, I'm still hesitat

Re: [PATCH v2 1/1] nilfs2: add mount option that reduces super block writes

2014-02-11 Thread Ryusuke Konishi
On Tue, 11 Feb 2014 20:58:45 +0100, Andreas Rohner wrote: > On 2014-02-11 19:11, Ryusuke Konishi wrote: >> On Tue, 11 Feb 2014 15:07:48 +0100, Andreas Rohner wrote: >> Honestly, I'm still hesitative about the full scan approach since the >> mount time depends on the devic

Re: [PATCH v2 1/1] nilfs2: add mount option that reduces super block writes

2014-02-11 Thread Ryusuke Konishi
On Tue, 11 Feb 2014 15:07:48 +0100, Andreas Rohner wrote: > Hi Ryusuke, > > On 2014-02-11 13:31, Ryusuke Konishi wrote: >> Hi Andreas, >> On Sun, 2 Feb 2014 17:50:09 +0100, Andreas Rohner wrote: >>> This patch introduces a mount option bad_ftl that disables the

[PATCH 0/2] nilfs-utils: move generic definitions into util.h

2014-02-11 Thread Ryusuke Konishi
This series gathers up some generic macros and moves them into include/util.h to make them reusable, and then, simplifies a part of min/max calculations with the moved macros, min_t() and max_t(). Ryusuke Konishi -- Ryusuke Konishi (2): nilfs-utils: move utility definitions into util.h

[PATCH 2/2] nilfs-utils: use min_t() and max_t()

2014-02-11 Thread Ryusuke Konishi
Simplify some calculations in lssu, lscp, lib/gc.c, lib/nilfs.c, lib/cnoconv.c, and cleanerd with min_t() and max_t(). Signed-off-by: Ryusuke Konishi --- bin/lscp.c |8 bin/lssu.c |3 ++- lib/cnoconv.c|5 +++-- lib/gc.c

[PATCH 1/2] nilfs-utils: move utility definitions into util.h

2014-02-11 Thread Ryusuke Konishi
Gather up definitions of utility macros such as min_t(), max_t(), DIV_ROUND_UP(), ARRAY_SIZE(), nilfs_cnt64_ge(), etc, into include/util.h to make them reusable. Signed-off-by: Ryusuke Konishi --- include/Makefile.am |2 +- include/util.h | 49

Re: [PATCH v2 1/1] nilfs2: add mount option that reduces super block writes

2014-02-11 Thread Ryusuke Konishi
at the head of segments. But this is not guranteed. Is this condition eliminable? The measurement results are very interesting (thanks for the effort), but they look to rely on a few these ellipsis techniques for reducing recovery time. Regards, Ryusuke Konishi &g

Re: [PATCH] cldconfig: fix inconsistency in rounding percent values

2014-02-11 Thread Ryusuke Konishi
ch fixes the inconsistency by rounding up both values. > > Signed-off-by: Andreas Rohner Applied, thanks. Ryusuke Konishi -- To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http

[PATCH] lssu: display a "p" flag on protected segments

2014-02-10 Thread Ryusuke Konishi
Display a "p" flag in STAT field of the output lines of protected segments when -l (--latest-usage) option is specfied. This flag clarifies which segments are protected by garbage collection at that moment. Signed-off-by: Ryusuke Konishi --- bin/lssu.c | 29 ++--

[PATCH] lssu: fix protection period option

2014-02-10 Thread Ryusuke Konishi
Fix a bug of nilfs_get_latest_usage() function which blocks the protection period specified with -p option from being passed to nilfs_assess_segment() function and results in incorrect output of live block counts. Signed-off-by: Ryusuke Konishi --- bin/lssu.c |2 +- 1 file changed, 1

[patch 0/2] add live block count option to lssu command

2014-02-09 Thread Ryusuke Konishi
able. These options would help to choose min_reclaimable_blocks parameter or to consider how to improve garbage collection algorithm. Regards, Ryusuke Konishi -- Ryusuke Konishi (2): nilfs-utils: renew parser library lssu: add option to print count of live blocks bin/Makefile.am

[PATCH 1/2] nilfs-utils: renew parser library

2014-02-09 Thread Ryusuke Konishi
This renames checkpoint number library "lib/cno.c" to "lib/parser.c", and moves a parser routine of a protection period option included in nilfs-clean.c into parser.c to make it available from other programs. Signed-off-by: Ryusuke Konishi --- bin/Makefile.am

[PATCH 2/2] lssu: add option to print count of live blocks

2014-02-09 Thread Ryusuke Konishi
This adds new options "-l" and "-p" to lssu command. "-l" option prints count and ratio of live blocks for in-use segments, and "-p" option allows users to specify a protection period which is used to judge whether blocks are live or not. Signed-off-b

[PATCH] nilfs-clean: fix build warning at nilfs_clean_usage()

2014-02-09 Thread Ryusuke Konishi
Fix the following gcc warning: nilfs-clean.c: In function: 'nilfs_clean_usage': nilfs-clean.c:336: warning: unknown conversion type character ']' in format Signed-off-by: Ryusuke Konishi --- sbin/nilfs-clean/nilfs-clean.c |2 +- 1 file changed, 1 insertion(+),

[PATCH] lib/gc.c: remove redundant NULL check before nilfs_vector_destroy()

2014-02-07 Thread Ryusuke Konishi
nilfs_vector_destroy() does nothing if the given argument is NULL, thus we don't have to do a NULL check before calling nilfs_vector_destroy(). Signed-off-by: Ryusuke Konishi --- lib/gc.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/gc.c b/lib

Re: [PATCH v6 0/6] nilfs-utils: shortcut for certain GC operations

2014-02-07 Thread Ryusuke Konishi
est segments again. Then timestamp will move them > again. These moving operations are expensive and unnecessary. > > Regards, > Andreas Rohner Applied. Thank you for your effort! Ryusuke Konishi > --- > v5->v6 (based on review by Ryusuke Konishi) > * Add suppo

Re: [PATCH v5 5/6] nilfs-utils: add optimized version of nilfs_xreclaim_segments

2014-02-06 Thread Ryusuke Konishi
On Fri, 07 Feb 2014 13:56:56 +0900 (JST), Ryusuke Konishi wrote: > On Thu, 6 Feb 2014 15:17:25 +0100, Andreas Rohner wrote: >> @@ -1415,6 +1419,17 @@ static int nilfs_cleanerd_clean_segments(struct >> nilfs_cleanerd *cleanerd, >> nilfs_cleanerd_progress(cleane

Re: [PATCH v5 6/6] nilfs-utils: add a no_timeout flag to enable faster loop

2014-02-06 Thread Ryusuke Konishi
*ndone = stat.deferred_segs; > } else { > @@ -1501,6 +1504,8 @@ static int nilfs_cleanerd_clean_loop(struct > nilfs_cleanerd *cleanerd) > nilfs_cleanerd_clean_check_pause(cleanerd); > > while (!cleanerd->shutdown) { > + cleanerd->no_timeout = 0;

Re: [PATCH v5 5/6] nilfs-utils: add optimized version of nilfs_xreclaim_segments

2014-02-06 Thread Ryusuke Konishi
On Thu, 6 Feb 2014 15:17:25 +0100, Andreas Rohner wrote: > This patch adds an additional parameter min_reclaimable_blks to > the nilfs_reclaim_params structure. This parameter specifies the > minimum number of reclaimable blocks in a segment, before it can be > cleaned. If a segment is below this

Re: [PATCH v5 3/6] nilfs-utils: nilfs-clean add cmdline param min-reclaimable-blocks

2014-02-06 Thread Ryusuke Konishi
e; /* runtime in seconds */ uint32_t min_reclaimable_blocks; }; +enum nilfs_cleaner_args_unit { + NILFS_CLEANER_ARG_UNIT_NONE = 0, + NILFS_CLEANER_ARG_UNIT_PERCENT, + NILFS_CLEANER_ARG_UNIT_KB, /* kilo-byte (kB) */ + NILFS_CLEANER_ARG_UNIT_KIB,/* kibi-byte (KiB) */ + NILFS_CLEANER_ARG_UNIT_MB, /* mega-byte (MB) */ + NILFS_CLEANER_ARG_UNIT_MIB,/* mebi-byte (MiB) */ + NILFS_CLEANER_ARG_UNIT_GB, /* giga-byte (GB) */ + NILFS_CLEANER_ARG_UNIT_GIB,/* gibi-byte (GiB) */ + NILFS_CLEANER_ARG_UNIT_TB, /* tera-byte (TB) */ + NILFS_CLEANER_ARG_UNIT_TIB,/* tebi-byte (TiB) */ + NILFS_CLEANER_ARG_UNIT_PB, /* peta-byte (PB) */ + NILFS_CLEANER_ARG_UNIT_PIB,/* pebi-byte (PiB) */ + NILFS_CLEANER_ARG_UNIT_EB, /* exa-byte (EB) */ + NILFS_CLEANER_ARG_UNIT_EIB,/* exbi-byte (EiB) */ + + NILFS_CLEANER_ARG_MIN_BINARY_SUFFIX = NILFS_CLEANER_ARG_UNIT_KB, + NILFS_CLEANER_ARG_MAX_BINARY_SUFFIX = NILFS_CLEANER_ARG_UNIT_EIB, +}; Then, we can implement -m option so that it specifies a ratio if it is terminated with "%" symbol. Please consider adding a patch for that. I am thinking of applying this series this time regardless of this comment unless there is an unignorable problem. Thanks, Ryusuke Konishi -- To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v5 2/6] nilfs-utils: add NILFS_OPT_SET_SUINFO

2014-02-06 Thread Ryusuke Konishi
eanerd_config(struct nilfs_cleanerd > *cleanerd, > else > nilfs_opt_clear_mmap(cleanerd->nilfs); > #endif /* HAVE_MMAP */ > + > + if (cleanerd->config.cf_use_set_suinfo) > + nilfs_opt_set_set_suinfo(cleanerd->nilfs); > +

Re: [PATCH v5 1/6] nilfs-utils: cldconfig add an option to set min. reclaimable blocks

2014-02-06 Thread Ryusuke Konishi
-1442,6 +1450,8 @@ static int nilfs_cleanerd_clean_loop(struct > nilfs_cleanerd *cleanerd) > > cleanerd->ncleansegs = cleanerd->config.cf_nsegments_per_clean; > cleanerd->cleaning_interval = cleanerd->config.cf_cleaning_interval; > + cleanerd->min_reclaimable_b

Re: [PATCH v4 6/6] nilfs-utils: add a no_timeout flag to enable faster loop

2014-02-05 Thread Ryusuke Konishi
differently. I meant stat.cleaned_segs is decreased if stat.deferred_segs > 0. So, the following relation will be fulfilled. cleaned_segs + deferred_segs + protected_segs == nsegs (number of requested segments) > + syslog(LOG_DEBUG, "segment %llu deferred", > + (

Re: [PATCH v4 5/6] nilfs-utils: add optimized version of nilfs_xreclaim_segments

2014-02-05 Thread Ryusuke Konishi
if (ret < 0) >> +goto out_lock; >> + >> + supv = malloc(sizeof(struct nilfs_suinfo_update) * n); >> +if (supv == NULL) { >> +ret = -1; >> +goto out_lock; >> +} > > I have already changed nilfs_xreclaim_segments to use > nilfs_vector_create for supv instead of malloc and free directly. Don't > know why I originally used malloc, since the rest of the function uses > the nilfs_vector API. Ok, I skip this one to review new patches. The current comments on this patch are as follows: 1. Multiline comments should be as follows: /* * if there are less reclaimable blocks than the minimal * threshold try to update suinfo instead of cleaning */ 2. The flag name "NILFS_RECLAIM_PARAM_DEFERRABLE" looks confusing. Why not use NILFS_RECLAIM_PARAM_MIN_RECLAIMABLE_BLKS ? Regards, Ryusuke Konishi -- To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v4 4/6] nilfs-utils: add suport for NILFS_IOCTL_SET_SUINFO ioctl

2014-02-05 Thread Ryusuke Konishi
On Thu, 06 Feb 2014 00:43:01 +0100, Andreas Rohner wrote: > Hi Ryusuke, > > On 2014-02-05 20:25, Ryusuke Konishi wrote: >>> /** >>> + * nilfs_set_suinfo - sets segment usage info >>> + * @nilfs: nilfs object .. >> >> This invalidation should be

Re: [PATCH v4 4/6] nilfs-utils: add suport for NILFS_IOCTL_SET_SUINFO ioctl

2014-02-05 Thread Ryusuke Konishi
argv.v_size = sizeof(struct nilfs_suinfo_update); > + argv.v_index = 0; > + argv.v_flags = 0; > + if (ioctl(nilfs->n_iocfd, NILFS_IOCTL_SET_SUINFO, &argv) < 0) { > + if (errno == ENOTTY) > + nilfs_opt_clear_set_suinfo(nilfs); Thi

Re: [PATCH v4 3/6] nilfs-utils: nilfs-clean add cmdline param min-reclaimable-blocks

2014-02-05 Thread Ryusuke Konishi
min_reclaimable_blocks is out of range, NILFS_CLEANER_RSP_NACK should be returned: if (req2->args.valid & NILFS_CLEANER_ARG_MIN_RECLAIMABLE_BLOCKS) { if (req2->args.min_reclaimable_blocks > nilfs_get_blocks_per_segment(cleanerd->nilfs))

Re: [PATCH v4 2/6] nilfs-utils: add NILFS_OPT_SET_SUINFO

2014-02-05 Thread Ryusuke Konishi
ile was read in. > > Signed-off-by: Andreas Rohner This looks OK to me. Regards, Ryusuke Konishi > --- > include/nilfs.h | 7 ++- > lib/nilfs.c | 28 > sbin/cleanerd/cleanerd.c | 6 ++ > 3 files changed, 40 insertions

Re: [PATCH v4 1/6] nilfs-utils: cldconfig add an option to set min. reclaimable blocks

2014-02-05 Thread Ryusuke Konishi
_nsegments_per_clean; > cleanerd->cleaning_interval = cleanerd->config.cf_cleaning_interval; > + cleanerd->min_reclaimable_blocks = > + cleanerd->config.cf_min_reclaimable_blocks; > > > if (nilfs_cleanerd_automatic_suspend(cleanerd

Re: [PATCH 0/2] refactor reclaim function

2014-02-04 Thread Ryusuke Konishi
Hi Andreas, On Wed, 5 Feb 2014 03:37:24 +0900, Ryusuke Konishi wrote: > This series adds nilfs_xreclaim_segment() api function to the GC > library, and modifies cleneard so that it uses the extended API > function. > > nilfs_xreclaim_segment() is an enhanced version of the existin

[PATCH 0/2] refactor reclaim function

2014-02-04 Thread Ryusuke Konishi
compatibility reason. Regards, Ryusuke Konishi --- Ryusuke Konishi (2): lib/gc.c: refactor reclaim function cleanerd: use nilfs_xreclaim_segment() include/nilfs_gc.h | 60 + lib/gc.c | 111 +++--- sbin

[PATCH 2/2] cleanerd: use nilfs_xreclaim_segment()

2014-02-04 Thread Ryusuke Konishi
Refactor nilfs_cleanerd_clean_segments() with nilfs_xreclaim_segment() function. Signed-off-by: Ryusuke Konishi --- sbin/cleanerd/cleanerd.c | 57 +- 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/sbin/cleanerd/cleanerd.c b/sbin

[PATCH 1/2] lib/gc.c: refactor reclaim function

2014-02-04 Thread Ryusuke Konishi
compatibility reason, but the implementation is replaced by nilfs_xreclaim_segment() function. Signed-off-by: Ryusuke Konishi --- include/nilfs_gc.h | 60 lib/gc.c | 111 +--- 2 files changed, 156 insertions

Re: [PATCH 3/4] nilfs2: add nilfs_sufile_set_suinfo to update segment usage

2014-02-04 Thread Ryusuke Konishi
On Wed, 05 Feb 2014 01:41:37 +0900 (JST), Ryusuke Konishi wrote: > On Mon, 3 Feb 2014 13:38:18 -0800, Andrew Morton wrote: >> On Tue, 4 Feb 2014 01:50:43 +0900 Ryusuke Konishi >> wrote: >> >>> From: Andreas Rohner >>> >>> This patch introd

Re: [PATCH 3/4] nilfs2: add nilfs_sufile_set_suinfo to update segment usage

2014-02-04 Thread Ryusuke Konishi
On Mon, 3 Feb 2014 13:38:18 -0800, Andrew Morton wrote: > On Tue, 4 Feb 2014 01:50:43 +0900 Ryusuke Konishi > wrote: > >> From: Andreas Rohner >> >> This patch introduces the nilfs_sufile_set_suinfo function, which >> expects an array of nilfs_suinfo_

[PATCH] nilfs2: add description of NILFS_IOCTL_SET_SUINFO ioctl

2014-02-03 Thread Ryusuke Konishi
Add description of NILFS_IOCTL_SET_SUINFO ioctl in Documentation/filesystems/nilfs2.txt to make it up-to-date. Signed-off-by: Ryusuke Konishi Cc: Andreas Rohner --- Documentation/filesystems/nilfs2.txt |7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/filesystems

Re: [PATCH 4/4] nilfs2: implementation of NILFS_IOCTL_SET_SUINFO ioctl

2014-02-03 Thread Ryusuke Konishi
On Mon, 3 Feb 2014 13:41:01 -0800, Andrew Morton wrote: > On Tue, 4 Feb 2014 01:50:44 +0900 Ryusuke Konishi > wrote: > >> With this ioctl the segment usage entries in the SUFILE can be >> updated from userspace. >> >> This is useful, because it allows the

[PATCH 1/4] nilfs2: update MAINTAINERS file entries

2014-02-03 Thread Ryusuke Konishi
Update git repository entry of nilfs2 file system and maintainer's email description. Signed-off-by: Ryusuke Konishi --- MAINTAINERS |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index b2cf5cf..342caaa 100644 --- a/MAINTAINERS

[PATCH 4/4] nilfs2: implementation of NILFS_IOCTL_SET_SUINFO ioctl

2014-02-03 Thread Ryusuke Konishi
d-off-by: Ryusuke Konishi --- fs/nilfs2/ioctl.c | 92 + include/linux/nilfs2_fs.h |2 + 2 files changed, 94 insertions(+) diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c index 2b34021..c19a231 100644 --- a/fs/nilfs2/ioctl.c +++ b/fs/n

[PATCH 2/4] nilfs2: add struct nilfs_suinfo_update and flags

2014-02-03 Thread Ryusuke Konishi
From: Andreas Rohner This patch adds the nilfs_suinfo_update structure, which contains the information needed to update one segment usage entry. The flags specify, which fields need to be updated. Signed-off-by: Andreas Rohner Signed-off-by: Ryusuke Konishi --- include/linux/nilfs2_fs.h

[PATCH 3/4] nilfs2: add nilfs_sufile_set_suinfo to update segment usage

2014-02-03 Thread Ryusuke Konishi
-by: Andreas Rohner Signed-off-by: Ryusuke Konishi --- fs/nilfs2/sufile.c | 131 fs/nilfs2/sufile.h |1 + 2 files changed, 132 insertions(+) diff --git a/fs/nilfs2/sufile.c b/fs/nilfs2/sufile.c index 3127e9f..c37b5f0 100644 --- a/fs

[PATCH 0/4] nilfs2 updates

2014-02-03 Thread Ryusuke Konishi
userland counterpart is not yet finished, but this kernel patchset is ready for merge, I think. My additional patch updates entries of nilfs2 file system in MAINTAINERS file (independently). Thanks in advance, Ryusuke Konishi -- Andreas Rohner (3): nilfs2: add struct nilfs_suinfo_update

Re: [PATCH v5 3/3] nilfs2: implementation of NILFS_IOCTL_SET_SUINFO ioctl

2014-01-31 Thread Ryusuke Konishi
ion, but the writing of > the live blocks can be skipped if it's not worth it. > > Signed-off-by: Andreas Rohner Applied. Thanks a lot for your effort. Ryusuke Konishi > --- > fs/nilfs2/ioctl.c | 92 > +++ > includ

Re: [PATCH v5 2/3] nilfs2: add nilfs_sufile_set_suinfo to update segment usage

2014-01-31 Thread Ryusuke Konishi
n for the newly introduced > NILFS_IOCTL_SET_SUINFO ioctl. > > Signed-off-by: Andreas Rohner Applied, thanks! Ryusuke Konishi > --- > fs/nilfs2/sufile.c | 131 > + > fs/nilfs2/sufile.h | 1 + > 2 files changed, 132 in

Re: [PATCH v5 1/3] nilfs2: add struct nilfs_suinfo_update and flags

2014-01-31 Thread Ryusuke Konishi
On Fri, 31 Jan 2014 11:46:05 +0100, Andreas Rohner wrote: > This patch adds the nilfs_suinfo_update structure, which contains the > information needed to update one segment usage entry. The flags > specify, which fields need to be updated. > > Signed-off-by: Andreas Rohner Applied to my github r

Re: [PATCH v4 2/3] nilfs2: add nilfs_sufile_set_suinfo to update segment usage

2014-01-31 Thread Ryusuke Konishi
On Fri, 31 Jan 2014 11:14:45 +0100, Andreas Rohner wrote: > On 2014-01-31 09:58, Ryusuke Konishi wrote: >> Hi Andreas, >> On Thu, 30 Jan 2014 09:42:49 +0100, Andreas Rohner wrote: >>> This patch introduces the nilfs_sufile_set_suinfo function, which >>> expect

Re: [PATCH v4 3/3] nilfs2: implementation of NILFS_IOCTL_SET_SUINFO ioctl

2014-01-31 Thread Ryusuke Konishi
On Thu, 30 Jan 2014 09:42:50 +0100, Andreas Rohner wrote: > With this ioctl the segment usage entries in the SUFILE can be > updated from userspace. > > This is useful, because it allows the userspace GC to modify and update > segment usage entries for specific segments, which enables it to avoid

Re: [PATCH v4 2/3] nilfs2: add nilfs_sufile_set_suinfo to update segment usage

2014-01-31 Thread Ryusuke Konishi
le_get_blkoff(sufile, sup->sup_segnum); > + if (blkoff == prev_blkoff) > + continue; > + > + /* get different block */ > + mark_buffer_dirty(bh); > + brelse(bh); > + ret = nilfs_mdt_get_block(sufi

Re: [PATCH 0/1] nilfs2: add mount option that reduces super block writes

2014-01-30 Thread Ryusuke Konishi
On Thu, 30 Jan 2014 07:29:14 +0100, Andreas Rohner wrote: > Hi Ryusuke, > > On 2014-01-30 06:29, Ryusuke Konishi wrote: >> Hi Andreas, >> On Thu, 30 Jan 2014 03:46:59 +0100, Andreas Rohner wrote: >>> Hi, >>> >>> This is only a hacky proof of concep

Re: [PATCH v3 2/3] nilfs2: add nilfs_sufile_set_suinfo to update segment usage

2014-01-29 Thread Ryusuke Konishi
Hi Andreas, On Tue, 28 Jan 2014 16:39:24 +0900 (JST), Ryusuke Konishi wrote: > On Tue, 28 Jan 2014 05:26:05 +0100, Andreas Rohner wrote: >> On 2014-01-28 02:03, Ryusuke Konishi wrote: >>> On Tue, 28 Jan 2014 00:42:35 +0100, Andreas Rohner wrote: >>>> On 2014-01-2

Re: [PATCH 0/1] nilfs2: add mount option that reduces super block writes

2014-01-29 Thread Ryusuke Konishi
ency of disk I/O about 5ms~20ms per a separate block (in the case of hard drives). So the maximum number of scans of segment summary blocks seems to be roughly 10~100 times. Regards, Ryusuke Konishi > > I repurposed the ss_pad field of nilfs_segment_summary to contain the > crc s

Re: [PATCH v3 2/3] nilfs2: add nilfs_sufile_set_suinfo to update segment usage

2014-01-27 Thread Ryusuke Konishi
On Tue, 28 Jan 2014 05:26:05 +0100, Andreas Rohner wrote: > On 2014-01-28 02:03, Ryusuke Konishi wrote: >> On Tue, 28 Jan 2014 00:42:35 +0100, Andreas Rohner wrote: >>> On 2014-01-27 20:07, Ryusuke Konishi wrote: >>>> On Mon, 27 Jan 2014 10:59:

Re: [PATCH v3 2/3] nilfs2: add nilfs_sufile_set_suinfo to update segment usage

2014-01-27 Thread Ryusuke Konishi
On Tue, 28 Jan 2014 00:42:35 +0100, Andreas Rohner wrote: > On 2014-01-27 20:07, Ryusuke Konishi wrote: >> On Mon, 27 Jan 2014 10:59:27 +0100, Andreas Rohner wrote: >>> + || (nilfs_suinfo_update_flags(sup) && >>> +

Re: [PATCH v3 2/3] nilfs2: add nilfs_sufile_set_suinfo to update segment usage

2014-01-27 Thread Ryusuke Konishi
ysu) > + ++ndirtysegs; > + else if (!dirtysi && dirtysu) > + --ndirtysegs; > + > + su->su_flags = cpu_to_le32(sup->sup_sui.sui_flags); > + > +

Re: [PATCH v3 0/4] nilfs-utils: shortcut for certain GC operations

2014-01-27 Thread Ryusuke Konishi
On Mon, 27 Jan 2014 16:47:32 +0100, Andreas Rohner wrote: > On 2014-01-27 16:03, Ryusuke Konishi wrote: >> Hi Andreas, >> On Mon, 27 Jan 2014 10:58:52 +0100, Andreas Rohner wrote: >>> Hi, >>> >>> This is the third version of this patch set. It basicall

Re: [PATCH v3 3/3] nilfs2: implementation of NILFS_IOCTL_SET_SUINFO ioctl

2014-01-27 Thread Ryusuke Konishi
size * argv.v_nmembs; The following check should be inserted to avoid overflow of variable "len". if (argv.v_nmembs >= UINT_MAX / argv.v_size) goto out; The size argument of vmalloc() is unsigned long, but sizeof(unsinged long) differs depending on architectur

Re: [PATCH v3 1/3] nilfs2: add struct nilfs_suinfo_update and flags

2014-01-27 Thread Ryusuke Konishi
FS_SUINFO_UPDATE_FNS(FLAGS, flags) > + > /* ioctl */ > enum { > NILFS_CHECKPOINT, > -- > 1.8.5.3 This patch looks good to me. Strictly speaking, these declarations should be inserted in the ioctl section of nilfs2_fs.h which starts from the comment line /* ioctl */ ins

Re: [PATCH v3 0/4] nilfs-utils: shortcut for certain GC operations

2014-01-27 Thread Ryusuke Konishi
nchmarks are currently running. I will give you the results > shortly. The kernel patchset didn't apply to the mainline as is because Vyacheslav's ioctl commentary patch just has been merged. Please rebase your patchset on the current master branch next time. Also, nilfs_ioctl_se

[ANNOUNCE] NILFS utils 2.1.6 release

2014-01-26 Thread Ryusuke Konishi
related changes: - allow to make without libblkid - compile legacy {mount,umount}.nilfs2 with libselinux - add --with-libmount build option * fix many coding style issues Please see the following changelog for details: http://www.nilfs.org/download/ChangeLog-utils-v2 Thanks, Ryusuke

[PATCH] nilfs-utils: fix build of dist archives

2014-01-26 Thread Ryusuke Konishi
The following files are missing in the archive files generated by "make dist-*": - .gitignore files - autogen.sh script - checkpatch.pl script This fixes the issue. Signed-off-by: Ryusuke Konishi --- Makefile.am |6 +- bin/Makefile.am

Re: [PATCH v2 4/5] nilfs-utils: add support for NILFS_IOCTL_SET_SUINFO ioctl

2014-01-26 Thread Ryusuke Konishi
On Fri, 24 Jan 2014 21:00:03 +0100, Andreas Rohner wrote: > On 2014-01-24 19:26, Ryusuke Konishi wrote: >>> + ret = nilfs_set_suinfo(nilfs, supv, n); >>> + free(supv); >>> + if (ret >= 0) { >>> + /* success,

[PATCH] lib/nilfs.c: remove broken readonly fs check at nilfs_sync()

2014-01-26 Thread Ryusuke Konishi
nilfs_sync() API function is wrongly checking EROFS error. It sees the return value of ioctl instead of errno variable. This removes the broken error check from nilfs_sync() instead of fixing it because EROFS should by rights be used or ignored by callers. Signed-off-by: Ryusuke Konishi

Re: [PATCH v2 0/5] nilfs-utils: skip inefficient gc operations

2014-01-25 Thread Ryusuke Konishi
"free blocks" term sounds confusing. We often use terms "live" and "dead" for garbage collection, but "dead blocks" also sounds unfit to me as Vyacheslav pointed out. How about "min reclaimable blocks" or "min collectable blocks" ? Regards, Ryusuke Konishi -- To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 4/5] nilfs-utils: add support for NILFS_IOCTL_SET_SUINFO ioctl

2014-01-25 Thread Ryusuke Konishi
On Fri, 24 Jan 2014 21:00:03 +0100, Andreas Rohner wrote: > On 2014-01-24 19:26, Ryusuke Konishi wrote: >> You should design the new reclaim function so that it turns off the >> logic using nilfs_set_suinfo() once nilfs_set_suinfo() returned a >> status code < 0 and errno

[PATCH] lib/nilfs.c: add missing comments of API functions

2014-01-24 Thread Ryusuke Konishi
Signed-off-by: Ryusuke Konishi --- lib/nilfs.c | 128 ++- 1 file changed, 75 insertions(+), 53 deletions(-) diff --git a/lib/nilfs.c b/lib/nilfs.c index 7265830..05b9b03 100644 --- a/lib/nilfs.c +++ b/lib/nilfs.c @@ -223,12 +223,20

Re: [PATCH v2 4/5] nilfs-utils: add support for NILFS_IOCTL_SET_SUINFO ioctl

2014-01-24 Thread Ryusuke Konishi
once nilfs_set_suinfo() returned a status code < 0 and errno was ENOTTY. This fallback logic is needed to keep compatibility for old kernel. In addition, whether applying the optimization or not, should be selectable in /etc/nilfs_cleanerd.conf. > + } > + > ret = nilfs

Re: [PATCH v2 3/5] nilfs-utils: refactoring of nilfs_reclaim_segment to add minblocks param

2014-01-24 Thread Ryusuke Konishi
ilfs_cno_t protcno, unsigned long minblocks); This breaks compatibility of libnilfsgc library. Please add new function with the extended arguments, the old function can share implementation of the new function. Ryusuke Konishi > static inline int nilfs_suinfo_reclaimable(const struct nilf

Re: [PATCH v2 2/3] nilfs2: add nilfs_sufile_set_suinfo to update segment usage info

2014-01-24 Thread Ryusuke Konishi
On Fri, 24 Jan 2014 13:34:36 +0100, Andreas Rohner wrote: > On 2014-01-24 12:56, Ryusuke Konishi wrote: >> On Tue, 21 Jan 2014 15:00:29 +0100, Andreas Rohner wrote: >>> This patch introduces the nilfs_sufile_set_suinfo function, which >>> expects an array of nilfs_s

Re: [PATCH v2 3/3] nilfs2: implementation of NILFS_IOCTL_SET_SUINFO ioctl

2014-01-24 Thread Ryusuke Konishi
On Fri, 24 Jan 2014 14:44:38 +0100, Andreas Rohner wrote: > On 2014-01-24 14:20, Ryusuke Konishi wrote: >> On Tue, 21 Jan 2014 15:00:30 +0100, Andreas Rohner wrote: >>> With this ioctl the segment usage information in the SUFILE can be >>> updated from userspace. >>

Re: [PATCH v2 3/3] nilfs2: implementation of NILFS_IOCTL_SET_SUINFO ioctl

2014-01-24 Thread Ryusuke Konishi
ree; } nilfs_transaction_begin(inode->i_sb, &ti, 0); ret = < call nilfs_sufile_set_suinfo > ; if (unlikely(ret < 0)) nilfs_transcation_abort(inode->i_sb); else nilfs_transcation_commit(inode->i_sb);

Re: [PATCH v2 1/3] nilfs2: add new nilfs_suinfo_update struct

2014-01-24 Thread Ryusuke Konishi
On Fri, 24 Jan 2014 13:11:47 +0100, Andreas Rohner wrote: > On 2014-01-24 05:56, Ryusuke Konishi wrote: >> On Tue, 21 Jan 2014 15:00:28 +0100, Andreas Rohner wrote: >> Do you really need different suinfo update flags per segment ? > > No. > >> If it&

Re: [PATCH v2 2/3] nilfs2: add nilfs_sufile_set_suinfo to update segment usage info

2014-01-24 Thread Ryusuke Konishi
On Tue, 21 Jan 2014 15:00:29 +0100, Andreas Rohner wrote: > This patch introduces the nilfs_sufile_set_suinfo function, which > expects an array of nilfs_suinfo_update structures and updates the > segment usage information accordingly. > > This is basically a helper function for the newly introduc

Re: [PATCH v2 1/3] nilfs2: add new nilfs_suinfo_update struct

2014-01-23 Thread Ryusuke Konishi
7;t have to add nilfs_suinfo_update structure. v_flags of nilfs_argv structure looks to be available for that purpose. It's just a confirmation. Basically, I think this extension is acceptable. Regards, Ryusuke Konishi > + > +enum { > + NILFS_SUINFO_UPDATE_LASTMOD, >

[PATCH] mount.nilfs2: ensure gcpid option is dropped if the value is zero

2014-01-22 Thread Ryusuke Konishi
its value equals zero. Signed-off-by: Ryusuke Konishi --- sbin/mount/mount.nilfs2.c | 22 ++ sbin/mount/mount_opts.h| 28 sbin/mount/umount.nilfs2.c |4 ++-- 3 files changed, 36 insertions(+), 18 deletions(-) diff --git a/sbin/mount/mo

[PATCH] lib/cleaner_exec.c: get process ID of cleanerd through pipe

2014-01-22 Thread Ryusuke Konishi
e issue by letting cleanerd print out the pid of spawned daemon and letting nilfs_launch_cleanerd() function read it through pipe. Signed-off-by: Ryusuke Konishi Cc: Hitoshi Mitake --- lib/cleaner_exec.c | 84 ++ man/nilfs_cleanerd.8 |

Re: [ANNOUNCE] nilfs2-kmod-0.5.1 release

2014-01-21 Thread Ryusuke Konishi
On Sat, 18 Jan 2014 09:42:28 +0900 (JST), Ryusuke Konishi wrote: > Hi folks, > > I pushed out the updated version of nilfs2 kernel module for CentOS 6 > and other RHEL6 clones to github: > > https://github.com/nilfs-dev/nilfs2-kmod-centos6.git > > This release includes

Re: [PATCH 1/4] nilfs-utils: cldconfig add an option to set minimal free blocks

2014-01-20 Thread Ryusuke Konishi
t;> send-email" to submit the patch. >> > > It is requirement for kernel patches. You can see it in kernel > documentations. I think the additional from line and patch title line are only required when they are different from those in the mail headers. Regards, Ryusuke Konishi -

[PATCH] lib/nilfs.c: add missing initializations of ioctl arguments

2014-01-19 Thread Ryusuke Konishi
Some wrapper functions for ioctl APIs in libnilfs do not initialize unused arguments passed to kernel space. This is hurting extensibility of these ioctls. This fixes the issue. Signed-off-by: Ryusuke Konishi --- lib/nilfs.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/lib

<    1   2   3   4   5   6   7   8   9   10   >