On 2017/10/02 18:01, Hugo Mills wrote:
> On Mon, Oct 02, 2017 at 11:39:05AM +0300, Andrei Borzenkov wrote:
>> On Mon, Oct 2, 2017 at 11:19 AM, Misono, Tomohiro
>> <misono.tomoh...@jp.fujitsu.com> wrote:
>>> This patch changes "subvol set-default
This patch changes "subvol set-default" to also accept the subvolume path
for convenience.
This is the one of the issue on github:
https://github.com/kdave/btrfs-progs/issues/35
If there are two args, they are assumed as subvol id and path to the fs
(the same as current behavior), and if there
I rethink this and conclude that we should only allow the absolute path to
the subvolume in order to prevent setting wrong filesystem by mistake when
multiple filesystems are used.
I will submit the patch again and please ignore this.
Regards,
Tomohiro
On 2017/10/02 15:25, Misono, Tomohiro
This patch changes "subvol set-default" to also accept the subvolume path
for convenience.
This is the one of the issue on github:
https://github.com/kdave/btrfs-progs/issues/35
If there are two args, they are assumed as subvol id and path to the fs
(the same as current behavior), and if there
Fix subvol del --commit-after to work properly:
- SYNC ioctl will be issued even when last delete is failed
- SYNC ioctl will be issued on each file system only once in the end
To achieve this, get_fsid() and add_seen_fsid() is called after each delete
to keep only one fd for each fs.
In the
Change seen_fsid to hold fd and DIR* in order to keep access to each fs.
This will be used for 'subvol delete --commit-after'.
Signed-off-by: Tomohiro Misono
Reviewed-by: Qu Wenruo
---
cmds-filesystem.c | 4 ++--
utils.c | 6
Make is_seen_fsid()/add_seen_fsid()/free_seen_fsid() to common functions.
This will be used for 'subvol delete --commit-after'.
Signed-off-by: Tomohiro Misono
Reviewed-by: Qu Wenruo
---
cmds-filesystem.c | 88
Make get_fsid() to a common function.
This will be used for 'subvol delete --commit-after'.
Signed-off-by: Tomohiro Misono
Reviewed-by: Qu Wenruo
---
cmds-property.c | 30 --
utils.c | 31
Current code is reversed in --commit-after and --commit-each operation.
i.e. --commit-after means --commit-each actually. This patch fix this
and also introduces enum type for more readable code.
Signed-off-by: Tomohiro Misono
Reviewed-by: Qu Wenruo
Fix subvol del --commit-after to work properly:
- SYNC ioctl will be issued even when last delete is failed
- SYNC ioctl will be issued on each file system only once in the end
To achieve this, each deleted subvol's (parent's) fsid is checked each
time. If the fsid is seen for the first time,
On 2017/09/26 22:08, Qu Wenruo wrote:
>
>
> On 2017年09月26日 13:45, Misono, Tomohiro wrote:
>> Change seen_fsid to hold fd and DIR* in order to keep access to each fs.
>> This will be used for 'subvol delete --commit-after'.
>
> It is already quite good, good enough for
Change seen_fsid to hold fd and DIR* in order to keep access to each fs.
This will be used for 'subvol delete --commit-after'.
Signed-off-by: Tomohiro Misono
---
cmds-filesystem.c | 4 ++--
utils.c | 6 +-
utils.h | 5 -
3 files
Fix subvol del --commit-after to work properly:
- SYNC ioctl will be issued even when last delete is failed
- SYNC ioctl will be issued on each file system only once in the end
To achieve this, get_fsid() and add_seen_fsid() is called after each delete
to keep only one fd for each fs.
In the
Make is_seen_fsid()/add_seen_fsid()/free_seen_fsid() to common functions.
This will be used for 'subvol delete --commit-after'.
Signed-off-by: Tomohiro Misono
---
cmds-filesystem.c | 88 ---
utils.c |
Make get_fsid() to a common function.
This will be used for 'subvol delete --commit-after'.
Signed-off-by: Tomohiro Misono
---
cmds-property.c | 30 --
utils.c | 31 +++
utils.h | 1 +
3
Fix subvol del --commit-after to work properly:
- SYNC ioctl will be issued even when last delete is failed
- SYNC ioctl will be issued on each file system only once in the end
To achieve this, each deleted subvol's (parent's) fsid is checked each
time. If the fsid is seen for the first time,
Since setup_root_args() is not used anymore, just remove it.
Signed-off-by: Tomohiro Misono
---
fs/btrfs/super.c | 35 ---
1 file changed, 35 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 7edd74d..f589c5b
Now parse_early_options() is used by both btrfs_mount() and mount_root().
However, the former only needs subvol related part and the latter needs
the others.
Therefore extract the subvol related parts from parse_early_options() and
move it to new parse function (parse_subvol_options()).
Cleanups btrfs_mount() by using mount_root(). This avoids getting
btrfs_mount() called twice in mount path.
Old btrfs_mount() will do:
0. VFS layer calls vfs_kern_mount() with registered file_system_type
(for btrfs, btrfs_fs_type). btrfs_mount() is called on the way.
1.
Add mount_root() and new file_system_type for preparation of cleanup of
btrfs_mount(). Code path is not changed yet.
mount_root() is almost the same as current btrfs_mount(), but doesn't
have subvolume related part.
Signed-off-by: Tomohiro Misono
---
Summary:
Cleanup mount path by avoiding calling btrfs_mount() twice.
No functional change. See below for longer explanation.
Changelog:
v3:
Reorganized patches again into four and added comments to the source.
Each patch can be applied and compiled while maintaining functionality.
The first
> (1) parse subvol id related options for later use in mount_subtree()
> (3) return by calling mount_subtree()
Sorry, this is not mount_subtree(), but mount_subvol().
Thanks,
Tomohiro
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to
Introduce new btrfs_mount() using previous setups.
This will do:
(1) parse subvol id related options for later use in mount_subtree()
(2) mount device's root by calling vfs_kern_mount() with
btrfs_root_fs_type. As a result, mount_root() is called
(3) return by calling mount_subtree()
The
Extract the part related to subvol option from parse_early_options() and
move it to new parse function (parse_subvol_options()).
This is because mount_root() doesn't need to handle subvol options.
Signed-off-by: Tomohiro Misono
---
fs/btrfs/super.c | 75
Remove subvol related part from btrfs_mount() and change its name to
mount_root(). Also, file_system_type having mount_root() is defined
for the third patch.
New btrfs_mount() will be introduced in the third patch.
Signed-off-by: Tomohiro Misono
---
Summary:
Cleanup mount path by avoiding calling btrfs_mount() twice.
No functional change.
change to v2: split the patch into three parts.
Long Explanation:
btrfs uses mount_subtree() to mount a subvolume directly. This function
needs a vfsmount* of device's root (/), which is a return value of
On 2017/09/20 23:21, Qu Wenruo wrote:
>
>
> On 2017年09月20日 22:03, David Sterba wrote:
>> On Wed, Sep 20, 2017 at 08:22:54AM +0800, Qu Wenruo wrote:
>>> The costly part will be tracking the filesystems of subvolumes.
>>> We must do it for each subvolume and batch them to address the final
>>>
On 2017/09/19 23:48, David Sterba wrote:
> On Tue, Sep 19, 2017 at 04:50:04PM +0900, Misono, Tomohiro wrote:
>> I read the code of "subvolume delete" and found that --commit-after option is
>> not working well.
>>
>> Since it issues BTRFS_IOC_START/W
Hello,
I read the code of "subvolume delete" and found that --commit-after option is
not working well.
Since it issues BTRFS_IOC_START/WAIT_SYNC to the last fd (of directory
containing the last deleted subvolume),
1. sync operation affects only the last fd's filesystem.
("subvolume delete"
"btrfs subvolume create/delete" outputs the message of "Create/Delete
subvolume ..." even when an operation fails.
Since it is confusing, let's outputs the message only when an operation
succeeds.
Signed-off-by: Tomohiro Misono
---
cmds-subvolume.c | 8
Summary:
Cleanup mount path by avoiding calling btrfs_mount() twice.
This is for more understandable code and no functional change.
Explanation:
btrfs uses mount_subtree() to mount a subvolume directly. This function
needs a vfsmount* of device's root (/), which is a return value of
Hello,
Does anyone have a comment on this?
Regards, Tomohiro
Forwarded Message
Subject: [PATCH] btrfs: remove BTRFS_FS_QUOTA_DISABLING flag
Date: Wed, 30 Aug 2017 16:33:16 +0900
From: Misono, Tomohiro <misono.tomoh...@jp.fujitsu.com>
To: linux-btrfs@vger.kernel.org
Cur
Clean up spaces and use only tabs. No functional change.
Signed-off-by: Tomohiro Misono
---
btrfs-completion | 188 +++
1 file changed, 94 insertions(+), 94 deletions(-)
diff --git a/btrfs-completion
This patch updates btrfs-completion:
- add "filesystem du" and "rescure zero-log"
- restrict _btrfs_mnts to show btrfs type only
- add more completion in last case statements
(This file contains both spaces/tabs and may need cleanup.)
Signed-off-by: Tomohiro Misono
This new test checks inspect-internal rootid
- handle path to subvolume/directory/file as an argument
- get different id for each subvolume
- get the expected id for each file/directory (i.e. the same as
containing subvolume)
Signed-off-by: Tomohiro Misono
This new test checks inspect-internal rootid
- handle path to subvolume/directory/file as an argument
- get different id for each subvolume
- get the expected id for each file/directory
(i.e. the same as containing subvolume)
Signed-off-by: Tomohiro Misono
First patch causes test-convert fails. This is because
generate_dataset() creates a name containing trailing spaces for
"slow_symlink" type, and cause getfacl error in convert_test_perm().
(This is not noticed since original run_check_stdout() throws away the
error.)
Fix this by use space for
run_check_stdout() uses "... | tee ... || _fail". However, since tee
won't fail, _fail() is not called even if first command fails.
Fix this by checking PIPESTATUS in the end.
Signed-off-by: Tomohiro Misono
---
tests/common | 7 +--
1 file changed, 5
Since cmd_inspect_rootid() calls btrfs_open_dir(), it rejects a file to
be spcified. But as the document says, a file should be supported.
This patch introduces btrfs_open_file_or_dir(), which is a counterpart
of btrfs_open_dir(), to safely check and open btrfs file or directory.
The original
Use newly introduced common function to filter both $TEST_DIR and
$SCRATCH_MNT.
Signed-off-by: Tomohiro Misono
---
common/filter | 2 +-
tests/btrfs/029 | 11 +++
tests/generic/409 | 3 +--
tests/generic/410 | 3 +--
tests/generic/411 | 3 +--
5
Several tests uses both _filter_test_dir and _filter_scratch
concatenated by pipe to filter $TEST_DIR and $SCRATCH_MNT. However, this
would fail if the shorter string is a substring of the other (like
"/mnt" and "/mnt2").
This patch introduces new common filter function to safely call both
On 2017/08/31 16:33, Eryu Guan wrote:
> On Thu, Aug 31, 2017 at 08:53:09AM +0900, Misono, Tomohiro wrote:
>> On 2017/08/30 20:09, Eryu Guan wrote:
>>> On Wed, Aug 30, 2017 at 04:38:16PM +0900, Misono, Tomohiro wrote:
>>>> btrfs/029 uses _filter_testdirs() t
On 2017/08/30 20:09, Eryu Guan wrote:
> On Wed, Aug 30, 2017 at 04:38:16PM +0900, Misono, Tomohiro wrote:
>> btrfs/029 uses _filter_testdirs() to filter the name of $TEST_DIR and
>> $SCRATCH_MNT directory.
>>
>> In this function, it calls both _filter_test_dir and _filt
btrfs/029 uses _filter_testdirs() to filter the name of $TEST_DIR and
$SCRATCH_MNT directory.
In this function, it calls both _filter_test_dir and _filter_scratch
concatenated by pipe. Therefore if $TEST_DIR is a prefix of
$SCRATCH_MNT, this filter function gives wrong filtered name for
Currently, "btrfs quota enable" would fail after "btrfs quota disable" on
the first time with syslog output "qgroup_rescan_init failed with -22", but
it would succeed on the second time.
When "quota disable" is called, BTRFS_FS_QUOTA_DISABLING flag bit will be
set in fs_info->flags in
Sorry, this patch contains leading spaces, I will resend this soon.
On 2017/08/30 11:44, Misono, Tomohiro wrote:
> btrfs/029 uses _filter_testdirs() to filter the name of $TEST_DIR and
> $SCRATCH_MNT directory.
>
> In this function, it calls both _filter_test_dir and _fi
Sorry, this patch contains leading spaces, I will resend this soon.
On 2017/08/30 10:51, Misono, Tomohiro wrote:
> Currently, "btrfs quota enable" would fail after "btrfs quota disable" on
> the first time with syslog output "qgroup_rescan_init failed wi
btrfs/029 uses _filter_testdirs() to filter the name of $TEST_DIR and
$SCRATCH_MNT directory.
In this function, it calls both _filter_test_dir and _filter_scratch
concatenated by pipe. Therefore if $TEST_DIR is a prefix of
$SCRATCH_MNT, this filter function gives wrong filtered name for
Currently, "btrfs quota enable" would fail after "btrfs quota disable" on
the first time with syslog output "qgroup_rescan_init failed with -22", but
it would succeed on the second time.
When "quota disable" is called, BTRFS_FS_QUOTA_DISABLING flag bit will be
set in fs_info->flags in
On 2017/08/25 2:37, David Sterba wrote:
On Thu, Aug 24, 2017 at 04:39:53PM +0900, Misono, Tomohiro wrote:
"btrfs inspect-internal rootid " rejects a file to be specified in
the implementation.
Therefore change "file or directory" to "directory" in the doc.
Is th
The document of btrfs quota is missing figure 1.
I notice the body is copy of http://sensille.com/qgroups.pdf (whi
ch is linked from
https://btrfs.wiki.kernel.org/index.php/Quota_support), and insert the
figure.
Signed-off-by: Tomohiro Misono
---
"btrfs inspect-internal rootid " rejects a file to be specified in
the implementation.
Therefore change "file or directory" to "directory" in the doc.
Signed-off-by: Tomohiro Misono
---
Documentation/btrfs-inspect-internal.asciidoc | 2 +-
1 file changed, 1
Usage info of "btrfs check" shows "-Q|--qgroup-report" (and first patch
enables -Q), but the document only shows "--qgroup-report".
Therefore add -Q to the doc.
Signed-off-by: Tomohiro Misono
---
Documentation/btrfs-check.asciidoc | 2 +-
1 file changed, 1
This fixes "btrfs inspect-internal dump-super --bytenr"
Signed-off-by: Tomohiro Misono
---
cmds-inspect-dump-super.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/cmds-inspect-dump-super.c b/cmds-inspect-dump-super.c
index 98e0270..c7afd80 100644
This fixes "btrfs receive -E"
Signed-off-by: Tomohiro Misono
---
cmds-receive.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmds-receive.c b/cmds-receive.c
index 72e9c8f..e584cef 100644
--- a/cmds-receive.c
+++ b/cmds-receive.c
@@ -1277,7
I found some btrfs commands options are not working because of
inappropriate getopt_long() setting.
This fixes "btrfs check -Q/-E"
Signed-off-by: Tomohiro Misono
---
cmds-check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmds-check.c
Sorry, this patch's encoding is wrong.
Please ignore this and I will resend the patch.
On 2017/08/24 13:03, Misono, Tomohiro wrote:
I found some btrfs commands options are not working because of
inappropriate getopt_long() setting.
This fixes "btrfs check -Q/-E"
Signed-off-by
I found some btrfs commands options are not working because of
inappropriate getopt_long() setting.
This fixes "btrfs check -Q/-E"
Signed-off-by: Tomohiro Misono
---
cmds-check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmds-check.c
301 - 358 of 358 matches
Mail list logo