[PATCH] btrfs-progs: provide better error message for raid profile mismatch

2014-05-16 Thread Hidetoshi Seto
ple devices Error: unable to create FS with metadata profile RAID6 (have 2 devices but 3 devices are required) Signed-off-by: Hidetoshi Seto --- cmds-filesystem.c | 22 -- utils.c | 63 +++- utils.h

[PATCH] btrfs-progs: Copyright string update

2014-02-24 Thread Hidetoshi Seto
Fix corporate name for copyright. Signed-off-by: Hidetoshi Seto --- btrfs-list.h |2 +- btrfsck.h |2 +- chunk-recover.c|2 +- man/btrfs-convert.8.in |2 +- man/btrfs-debug-tree.8.in |2 +- man/btrfs-find-root.8.in |2

[PATCH] btrfs: Copyright string update

2014-02-24 Thread Hidetoshi Seto
Fix corporate name for copyright. Signed-off-by: Hidetoshi Seto --- fs/btrfs/delayed-inode.c |2 +- fs/btrfs/delayed-inode.h |2 +- fs/btrfs/math.h |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c

Re: [RFC PATCH] btrfs: fix null pointer deference at btrfs_sysfs_add_one+0x105

2014-02-13 Thread Hidetoshi Seto
I still see this trouble on v3.14-rc2. I confirmed that we cannot do mount with -o degraded without this patch. Could you pick this up, Chris? Thanks, H.Seto Feel free to add: Tested-by: Hidetoshi Seto (2014/01/15 18:22), Anand Jain wrote: > bdev is null when disk has disappeared and moun

[PATCH] Btrfs: skip submitting barrier for missing device

2014-02-04 Thread Hidetoshi Seto
evice. This patch stops sending/waiting barrier if device is missing. Signed-off-by: Hidetoshi Seto Cc: --- fs/btrfs/disk-io.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 8072cfa..7eb50f3 100644 --- a/fs/btrfs/disk-i

[PATCH v2 3/3] btrfs-progs: calculate available blocks on device properly

2013-09-04 Thread Hidetoshi Seto
h returns available bytes for allocation in specified device. Signed-off-by: Hidetoshi Seto --- ctree.h |8 + volumes.c | 104 +--- 2 files changed, 106 insertions(+), 6 deletions(-) diff --git a/ctree.h b/ctree.h index 0b0d

[PATCH v2 2/3] btrfs-progs: error if device have no space to make primary chunks

2013-09-04 Thread Hidetoshi Seto
ff-by: Hidetoshi Seto --- mkfs.c | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/mkfs.c b/mkfs.c index a98fe54..bac122f 100644 --- a/mkfs.c +++ b/mkfs.c @@ -81,6 +81,11 @@ static int make_root_dir(struct btrfs_root *root, int

[PATCH v2 1/3] btrfs-progs: error if device for mkfs is too small

2013-09-04 Thread Hidetoshi Seto
first step to fix problems around there, let mkfs to report error if the size of target volume is less than the size of the first system block group, BTRFS_MKFS_SYSTEM_GROUP_SIZE (= 4MB). Reported-by: Eric Sandeen Signed-off-by: Hidetoshi Seto --- mkfs.c |6 ++ 1 files changed, 6 insertions(

[PATCH v2 0/3] btrfs-progs: prevent mkfs from aborting with small volume

2013-09-04 Thread Hidetoshi Seto
Here are 3 patches to avoid undesired aborts of mkfs.btrfs. These are based on top of Chris's btrfs-progs.git: git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git Thanks, H.Seto Hidetoshi Seto (3): btrfs-progs: error if device for mkfs is too small btrfs-

Re: [PATCH 0/2] btrfs-progs: prevent mkfs from aborting with small volume

2013-08-27 Thread Hidetoshi Seto
(2013/08/26 23:23), Eric Sandeen wrote: > Thanks for looking into this - how small of a device did you test? > > I tried a 2MB device w/ these 2 patches and still got: > > [btrfs-progs]# truncate --size=2m testfile > [btrfs-progs]# ./mkfs.btrfs testfile > > WARNING! - Btrfs v0.20-rc1-360-geeeb4e

[PATCH 2/2] btrfs-progs: exit if there is not enough free space for mkfs

2013-08-22 Thread Hidetoshi Seto
: create_one_raid_group: Assertion `!(ret)' failed. Aborted (core dumped) This fix let mkfs prints error message if it cannot make filesystem due to a lack of free spaces. Signed-off-by: Hidetoshi Seto --- mkfs.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/mkfs.c b/m

[PATCH 1/2] btrfs-progs: treat reserved 1MB for superblock properly

2013-08-22 Thread Hidetoshi Seto
allocation is: avail = device->total_bytes - device->used_bytes - 1MB. 3) Therefore there is only free space 1MB less than requested. damn. So this fix let mkfs know how much spaces are really there. Signed-off-by: Hidetoshi Seto --- ctree.h |3 +++ volumes.c |7 ++-

[PATCH 0/2] btrfs-progs: prevent mkfs from aborting with small volume

2013-08-22 Thread Hidetoshi Seto
I found that mkfs.btrfs aborts when one of assigned volume is too small. Here are 2 patches to fix 2 independent problems. Both are based on top of Chris's btrfs-progs.git: git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git Thanks, H.Seto Hidetoshi Seto (2):

[PATCH v2 4/4] btrfs: support default mount options

2012-10-11 Thread Hidetoshi Seto
Make space to save default mount options in super block. Parse saved default mount options first and then parse mount options given when the file system is mounted. Signed-off-by: Hidetoshi Seto --- fs/btrfs/ctree.h |7 ++- fs/btrfs/super.c | 16 ++-- 2 files changed, 20

[PATCH v2 3/4] btrfs: make subroutine __btrfs_parse_options

2012-10-11 Thread Hidetoshi Seto
Separate long switch statement to be reused. Signed-off-by: Hidetoshi Seto --- fs/btrfs/super.c | 431 +++--- 1 files changed, 214 insertions(+), 217 deletions(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 83d6f9f..d51aaee 100644

[PATCH v2 2/4] Btrfs-progs: add mount-option command man page

2012-10-11 Thread Hidetoshi Seto
Add mount-option command man page. Signed-off-by: Hidetoshi Seto --- man/btrfs.8.in | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/man/btrfs.8.in b/man/btrfs.8.in index 4b0a9f9..85d5030 100644 --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -52,6

[PATCH v2 1/4] Btrfs-progs: add mount-option command

2012-10-11 Thread Hidetoshi Seto
This patch adds mount-option command that can set/get/clear default mount options. Signed-off-by: Hidetoshi Seto --- Makefile |4 +- btrfs-parse-mntopt.c | 109 + btrfs-parse-mntopt.h | 66 ++ btrfs.c |1 + cmds

[PATCH v2 0/4] Btrfs: set mount options permanently

2012-10-11 Thread Hidetoshi Seto
Following patches are going to implement one of unclaimed features listed in the btrfs wiki: https://btrfs.wiki.kernel.org/index.php/Project_ideas#Set_mount_options_permanently Previous v1 post and discussion can be referred from: http://lwn.net/Articles/516898/ v2: - Allow operator [+-=] like c

Re: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-19 Thread Hidetoshi Seto
(2012/09/18 21:30), David Sterba wrote: > On Tue, Sep 18, 2012 at 10:30:17AM +0900, Hidetoshi Seto wrote: ... > > So, you're basically implementing subset of the whole-filesystem > options. As has been mentioned, alternate way is to use the 'properties' > interfac

Re: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-19 Thread Hidetoshi Seto
(2012/09/18 11:31), Miao Xie wrote: > On tue, 18 Sep 2012 10:30:17 +0900, Hidetoshi Seto wrote: >> This patch adds mount-option command. >> The command can set/get default mount options. >> Now, the command can set/get 24 options. >> These options are equal to moun

Re: R: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-19 Thread Hidetoshi Seto
(2012/09/18 19:03), Goffredo Baroncelli wrote: > Hi Seto, > > please could you update also the man page too ? Sure. I'll update it next time. > Why it was not provided a way to clear a *single* flag ? To me it seems a bit > too long to clear all the flag (btrfs mount-option clear) and then se

Re: [PATCH 1/2] Btrfs: make space to keep default mount options

2012-09-19 Thread Hidetoshi Seto
(2012/09/18 21:10), David Sterba wrote: > On Tue, Sep 18, 2012 at 10:28:48AM +0900, Hidetoshi Seto wrote: >> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h >> index fa5c45b..3eb0551 100644 >> --- a/fs/btrfs/ctree.h >> +++ b/fs/btrfs/ctree.h >> @@ -458,8 +4

[PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-17 Thread Hidetoshi Seto
This patch adds mount-option command. The command can set/get default mount options. Now, the command can set/get 24 options. These options are equal to mount options which store in fs_info/mount-opt. Signed-off-by: Hidetoshi Seto --- Makefile |5 +- btrfs-parse-mntopt.c | 111

[PATCH 1/2] Btrfs: make space to keep default mount options

2012-09-17 Thread Hidetoshi Seto
This patch create space to hold default mount option, and to use saved default mount option change super.c to read default mount option first when mount devices. Signed-off-by: Hidetoshi Seto --- fs/btrfs/ctree.h |5 - fs/btrfs/super.c |2 ++ 2 files changed, 6 insertions(+), 1

[PATCH 0/2] Btrfs: set mount options permanently

2012-09-17 Thread Hidetoshi Seto
Following patches are going to implement one of unclaimed features listed in the btrfs wiki: https://btrfs.wiki.kernel.org/index.php/Project_ideas#Set_mount_options_permanently Special thanks to Kazuhiro Yamashita for his time and efforts. Your comments/reviews are welcomed. Thanks, H.Seto -- T

Re: [PATCH 2/2] Btrfs: fix the snapshot that should not exist

2012-07-27 Thread Hidetoshi Seto
(2012/07/26 15:57), Miao Xie wrote: > The snapshot should be the image of the fs tree before it was created, > so the metadata of the snapshot should not exist in the its tree. But now, we > found the directory item and directory name index is in both the snapshot tree > and the fs tree. It introdu

[PATCH 3/3] perf: allow typecast for signed value

2011-12-06 Thread Hidetoshi Seto
-" : __print_symbolic(...) ~ In perf's parser, the typecast, which is processed in process_paren(), only expects that (unsigned) token or another parenthesis will follow to the typecast. It should expect signed tokens can be there too. Signed-off-by: Hidetoshi Seto --- tool

[PATCH 2/3] perf: allow processing single op args

2011-12-06 Thread Hidetoshi Seto
; ~ process_arg() have code to parse '-9' as a "single op" arg, which is PRINT_OP as type, '-' as op and have '9' as right arg but no left arg. However arg_num_eval() have no code to handle this "single op" arg even it

[PATCH 1/3] perf: parse greater/less than or equal

2011-12-06 Thread Hidetoshi Seto
t Warning: unknown op '>=' Warning: Error: expected type 5 but read 1 Warning: failed to read event print fmt for btrfs_transaction_commit This patch allow perf command to parse operation tokens, '>=' and '<='. Signed-off-by: Hidetoshi Seto --- tools/pe

[PATCH 0/3] perf: parser fix for btrfs tracepoints

2011-12-06 Thread Hidetoshi Seto
After playing with v3.2-rc4, I found that the perf command failed to parse record contain data from (relatively new) btrfs tracepoints. This patch set will improve parser code of perf command and allow it to handle these data from btrfs tracepoints well. Thanks, H.Seto Hidetoshi Seto (3

Re: [PATCH] 254: disable space cache

2011-11-20 Thread Hidetoshi Seto
(2011/11/18 17:43), Li Zefan wrote: > I can't pass 254, and below is the output: > > 254 3s ... - output mismatch (see 254.out.bad) > ... > ID 256 top level 5 path snap > -ID 257 top level 5 path subvol > +ID 258 top level 5 path subvol > > When space cache is enabled (and now mkfs.btrfs always

[PATCH 3/3] btrfs-progs: Sort commands/descriptions in btrfs man page

2011-10-26 Thread Hidetoshi Seto
Sort items in man page, to put together items in the same group, and to put sequences of SYSNOPSIS and COMMANDS in same order. Signed-off-by: Hidetoshi Seto --- man/btrfs.8.in | 28 ++-- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/man/btrfs.8.in b

[PATCH 2/3] btrfs-progs: Misc fix for btrfs man page

2011-10-26 Thread Hidetoshi Seto
Remove duplicated entry for filesystem defrag, finish renaming device show to filesystem show, fix some minor misdescriptions and fix some format tokens. Signed-off-by: Hidetoshi Seto --- man/btrfs.8.in | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff

[PATCH 1/3] btrfs-progs: Update/clean up btrfs help and man page V2 (cont.)

2011-10-26 Thread Hidetoshi Seto
The commit 6f81e1197015ab2dc41beec92c347919feb26967 in for-chris branch is strange; somehow it does not apply a part of fixes and contains the dropped hunk in its patch description. This patch is to apply the dropped hunk. Signed-off-by: Hidetoshi Seto --- man/btrfs.8.in | 12 ++-- 1

[PATCH 0/3] btrfs-progs: fix btrfs man page

2011-10-26 Thread Hidetoshi Seto
Hi, Following patch set fixes/cleanups the man page of btrfs command. Based on for-chris branch. Thanks, H.Seto Hidetoshi Seto (3): btrfs-progs: Update/clean up btrfs help and man page V2 (cont.) btrfs-progs: Misc fix for btrfs man page btrfs-progs: Sort commands/descriptions

Re: [PATCH] btrfs: fix d_off in the first dirent

2011-08-17 Thread Hidetoshi Seto
ldir: 0 | readdir: d_off = 1, d_name = "." | telldir: 1 | readdir: d_off = 2, d_name = ".." | telldir: 2 | readdir: d_off = 3, d_name = "file0" : At the moment the "offset" for "." is unused because there is no preceding dirent, however it

[PATCH] btrfs: fix d_off in the first dirent

2011-08-17 Thread Hidetoshi Seto
r: d_off = 3, d_name = "file0" : At the moment the "offset" for "." is unused because there is no preceding dirent, however it is better to pass filp->f_pos to follow grammatical usage. Signed-off-by: Hidetoshi Seto --- fs/btrfs/inode.c |5 +++-- 1 files cha