Currently you can print subvol in a list or table format.
This patch will provide a way to extend this to other formats
like the upcoming raw format.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 26 +++---
btrfs-list.h | 3 +++
cmds-subvolume.c
get_subvol_name can be used other than the just with in cmds-send.c
so this patch will make it possible with out changing the original
intentions.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-send.c | 12 ++--
commands.h | 1 +
2 files changed, 7 insertions(+), 6 deletions
This adds show sub-command to the btrfs subvol cli
to display detailed inforamtion of the given subvol
or snapshot.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 25 +++--
btrfs-list.h | 3 +-
cmds-subvolume.c | 155
We need a function which can get the root_info of a given
subvol. This is in preparation to add support for the show
sub-cli.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 38 ++
btrfs-list.h | 1 +
2 files changed, 39 insertions(+)
diff
Stefan,
Thanks for the review.
if (sv_id == BTRFS_FS_TREE_OBJECTID) {
oh yes.
The common way to handle it is:
static int cmd_subvol_show(int argc, char **argv)
{
int mntfd = -1;
int fd = -1;
char *mnt = NULL;
char *fullpath = NULL;
...
sorry missed some git cli option and late noticed error in the
change-log, Pls. ignore this thread and ref to the email thread
with the subject:
[RESEND] [PATCH 00/10 v3] add show sub-command for btrfs subvol cli
-Anand
On 01/28/2013 12:10 PM, Anand Jain wrote:
Here is the v3
Here is the v4 of this patch-set, kindly review and accept.
v3-v4:
. Included a patch from Wang Shilong
. Added the changes to be inline with the above patch
Anand Jain (11):
Btrfs-progs: move open_file_or_dir() to utils.c
Btrfs-progs: move printing subvol list outside
), the required XOPEN version was raised from 6 to 7.
Signed-off-by: Anand Jain anand.j...@oracle.com
Original-Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de
---
Makefile | 4 ++--
btrfsctl.c | 7 ---
cmds-balance.c | 1 +
cmds-inspect.c | 1 +
cmds-qgroup.c| 1
To improve the code reuse its better to have btrfs_list_subvols
just return list of subvols witout printing
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 28 ++--
btrfs-list.h | 2 +-
cmds-subvolume.c | 4 ++--
3 files changed, 21 insertions
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 34 --
btrfs-list.h | 1 +
cmds-subvolume.c | 6 +-
3 files changed, 34 insertions(+), 7 deletions(-)
diff --git a/btrfs-list.c b/btrfs-list.c
index b404e1d..13a365d 100644
As we would add more ways to list and manage the subvols
and snapshots, its better if we have struct root_info
defined in the header file.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 47 ---
btrfs-list.h | 47
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 6 ++
btrfs-list.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/btrfs-list.c b/btrfs-list.c
index 0ee13b6..9c84ecb 100644
--- a/btrfs-list.c
+++ b/btrfs-list.c
@@ -1142,6 +1142,11 @@ static int filter_topid_equal
Currently you can print subvol in a list or table format.
This patch will provide a way to extend this to other formats
like the upcoming raw format.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 26 +++---
btrfs-list.h | 3 +++
cmds-subvolume.c
A useful function need to define it in a header file.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
commands.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/commands.h b/commands.h
index 8114a73..9b77f3e 100644
--- a/commands.h
+++ b/commands.h
@@ -103,3 +103,6 @@ int cmd_qgroup
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/btrfs-list.c b/btrfs-list.c
index db3665c..0cc368c 100644
--- a/btrfs-list.c
+++ b/btrfs-list.c
@@ -1502,19 +1502,24 @@ int btrfs_list_subvols_print(int
get_subvol_name can be used other than the just with in cmds-send.c
so this patch will make it possible with out changing the original
intentions.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-send.c | 12 ++--
commands.h | 1 +
2 files changed, 7 insertions(+), 6 deletions
This adds show sub-command to the btrfs subvol cli
to display detailed inforamtion of the given subvol
or snapshot.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 25 +++--
btrfs-list.h | 3 +-
cmds-subvolume.c | 155
. If someone's -ref_tree or its parent's -ref_tree is 0,
we will filter it.
Reported-by: Stefan Priebe s.pri...@profihost.ag
Signed-off-by: Wang Shilong wangsl-f...@cn.fujitsu.com
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 42 --
1
here the code is correct, this base does not have
[PATCH] Btrfs-progs: filter the deleted subvolumes when listing snapshots
which introduced -ENOENT as a return for the resolve_root.
however since we should have that. I have integrated, and
made corresponding changes in the
David,
Please find this patch-set rebased with your integration-20130130 branch.
v4-v5:
Fix a memory leak in the original code ref Patch 12/12
Fix the compiler warning in the patch 9/12
Anand Jain (11):
Btrfs-progs: move printing subvol list outside of btrfs_list_subvols
To improve the code reuse its better to have btrfs_list_subvols
just return list of subvols witout printing
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 28 ++--
btrfs-list.h | 2 +-
cmds-subvolume.c | 4 ++--
3 files changed, 21 insertions
As we would add more ways to list and manage the subvols
and snapshots, its better if we have struct root_info
defined in the header file.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 47 ---
btrfs-list.h | 47
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 34 --
btrfs-list.h | 1 +
cmds-subvolume.c | 6 +-
3 files changed, 34 insertions(+), 7 deletions(-)
diff --git a/btrfs-list.c b/btrfs-list.c
index ab42a33..03a0d02 100644
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 6 ++
btrfs-list.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/btrfs-list.c b/btrfs-list.c
index 0e4b3eb..93d167e 100644
--- a/btrfs-list.c
+++ b/btrfs-list.c
@@ -1143,6 +1143,11 @@ static int filter_topid_equal
A useful function need to define it in a header file.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
commands.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/commands.h b/commands.h
index 61d74d7..1dd6180 100644
--- a/commands.h
+++ b/commands.h
@@ -105,3 +105,6 @@ int cmd_replace
Currently you can print subvol in a list or table format.
This patch will provide a way to extend this to other formats
like the upcoming raw format.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 26 +++---
btrfs-list.h | 3 +++
cmds-subvolume.c
This adds show sub-command to the btrfs subvol cli
to display detailed inforamtion of the given subvol
or snapshot.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 25 +++--
btrfs-list.h | 3 +-
cmds-subvolume.c | 155
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/btrfs-list.c b/btrfs-list.c
index 69ee3e7..eadfba4 100644
--- a/btrfs-list.c
+++ b/btrfs-list.c
@@ -1503,19 +1503,24 @@ int btrfs_list_subvols_print(int
. If someone's -ref_tree or its parent's -ref_tree is 0,
we will filter it.
Reported-by: Stefan Priebe s.pri...@profihost.ag
Signed-off-by: Wang Shilong wangsl-f...@cn.fujitsu.com
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 42 --
1
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-subvolume.c | 57 +++-
1 file changed, 40 insertions(+), 17 deletions(-)
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index 9f1d2a4..5e51a26 100644
--- a/cmds-subvolume.c
+++ b/cmds
get_subvol_name can be used other than the just with in cmds-send.c
so this patch will make it possible with out changing the original
intentions.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-send.c | 12 ++--
commands.h | 1 +
2 files changed, 7 insertions(+), 6 deletions
We need a function which can get the root_info of a given
subvol. This is in preparation to add support for the show
sub-cli.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 38 ++
btrfs-list.h | 1 +
2 files changed, 39 insertions(+)
diff
Thanks for the review. Comments accepted. V5 sent out.
Anand
On 01/30/2013 11:27 AM, Wang Shilong wrote:
Hi,
To improve the code reuse its better to have btrfs_list_subvols
just return list of subvols witout printing
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c
Wang,
+ ret = 0;
+ /* print the info */
I think it will be better if you can move the following
printing to a function..it will make the code more clear and
readable..
Thanks for looking into this. However IMO there is no need
as of now. This can be taken when
David,
Kindly accept this patch for your Btrfs-progs
integration-20130130 branch. This patch updates
only man btrfs and is a very low risk category.
Thanks, Anand
Anand Jain (1):
Btrfs-progs: man btrfs: subcommands must be grouped together
man/btrfs.8.in | 12 ++--
1 file
Signed-off-by: Anand Jain anand.j...@oracle.com
---
man/btrfs.8.in | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/man/btrfs.8.in b/man/btrfs.8.in
index c8fdc15..8d3ecba 100644
--- a/man/btrfs.8.in
+++ b/man/btrfs.8.in
@@ -19,6 +19,8 @@ btrfs \- control a btrfs
David,
Please find this v6 show patch-set for your integration-20130130 branch.
v5-v6:
added
[PATCH 13/13] Btrfs-progs: add subvol flags to print
Anand Jain (12):
Btrfs-progs: move printing subvol list outside of btrfs_list_subvols
Btrfs-progs: add parent uuid for snapshots
To improve the code reuse its better to have btrfs_list_subvols
just return list of subvols witout printing
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 28 ++--
btrfs-list.h | 2 +-
cmds-subvolume.c | 4 ++--
3 files changed, 21 insertions
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 34 --
btrfs-list.h | 1 +
cmds-subvolume.c | 6 +-
3 files changed, 34 insertions(+), 7 deletions(-)
diff --git a/btrfs-list.c b/btrfs-list.c
index ab42a33..03a0d02 100644
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 6 ++
btrfs-list.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/btrfs-list.c b/btrfs-list.c
index 0e4b3eb..93d167e 100644
--- a/btrfs-list.c
+++ b/btrfs-list.c
@@ -1143,6 +1143,11 @@ static int filter_topid_equal
A useful function need to define it in a header file.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
commands.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/commands.h b/commands.h
index 61d74d7..1dd6180 100644
--- a/commands.h
+++ b/commands.h
@@ -105,3 +105,6 @@ int cmd_replace
. If someone's -ref_tree or its parent's -ref_tree is 0,
we will filter it.
Reported-by: Stefan Priebe s.pri...@profihost.ag
Signed-off-by: Wang Shilong wangsl-f...@cn.fujitsu.com
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 42 --
1
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-subvolume.c | 57 +++-
1 file changed, 40 insertions(+), 17 deletions(-)
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index 9f1d2a4..5e51a26 100644
--- a/cmds-subvolume.c
+++ b/cmds
get_subvol_name can be used other than the just with in cmds-send.c
so this patch will make it possible with out changing the original
intentions.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-send.c | 12 ++--
commands.h | 1 +
2 files changed, 7 insertions(+), 6 deletions
Currently you can print subvol in a list or table format.
This patch will provide a way to extend this to other formats
like the upcoming raw format.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 26 +++---
btrfs-list.h | 3 +++
cmds-subvolume.c
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/btrfs-list.c b/btrfs-list.c
index 69ee3e7..eadfba4 100644
--- a/btrfs-list.c
+++ b/btrfs-list.c
@@ -1503,19 +1503,24 @@ int btrfs_list_subvols_print(int
This patch adds the flags row which as of now will show if the
subvol/snapshot is readonly.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-subvolume.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index 5e51a26..c14e878 100644
--- a/cmds
We need a function which can get the root_info of a given
subvol. This is in preparation to add support for the show
sub-cli.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 38 ++
btrfs-list.h | 1 +
2 files changed, 39 insertions(+)
diff
As we would add more ways to list and manage the subvols
and snapshots, its better if we have struct root_info
defined in the header file.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-list.c | 47 ---
btrfs-list.h | 47
A trivial fix, corrects the indentation.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
utils.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/utils.c b/utils.c
index d660507..9c2e510 100644
--- a/utils.c
+++ b/utils.c
@@ -1192,12 +1192,13 @@ scan_again
You may need to update the minimum version of
libblkid-dev that is required. Since.
latest btrfs-progs needs
blkid_probe_get_wholedisk_devno()
from the libblkid-dev.
found libblkid-dev version 2.17.2 does not work,
and 2.22 works. Not sure which version introduced the
function required here.
-progs patch
Btrfs-progs: add feature to label subvol and snapshot
should be replaced with
Btrfs-progs: add attribute label for subvol and snapshot
(also posted in the mailing-list)
and the above kernel patch should be removed.
v4: rebased to David's integration-20130219 branch
Anand Jain (2
attribute label for subvol and snapshot)
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfslabel.c | 45 +
btrfslabel.h | 4 +++-
ctree.h | 4 +++-
ioctl.h | 2 ++
print-tree.c | 2 ++
5 files changed, 55 insertions(+), 2 deletions
This adds the command option label to the subvol sub-command,
this is a generic patch which will stay irrespective of which
approach we take, that is the ioctl-way or the attributes.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-subvolume.c | 37
This is the btrfs kernel changes to add supprt for the
subvol label.
The related (v4) Btrfs-progs patches are
Btrfs-progs: add feature to label subvol and snapshot
Btrfs-progs: cmd option to show or set the subvol label
v4: rebased to Josef Bacik btrfs-next
Anand Jain (1):
Btrfs
a consistent keyword across the
applications is difficult in the long run.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
fs/btrfs/ctree.h | 12 +-
fs/btrfs/ioctl.c | 58 ++
fs/btrfs/transaction.c | 1 +
include/uapi
On 02/27/2013 11:45 PM, David Sterba wrote:
On Fri, Feb 22, 2013 at 02:59:24PM +0800, Anand Jain wrote:
--- a/utils.c
+++ b/utils.c
@@ -1192,12 +1192,13 @@ scan_again:
return -ENOENT;
}
/* skip the header */
- for(i=0; i 2 ; i
From the below, we won't readily know from where the error is generated
-
cmds-device.c: fprintf(stderr, ERROR: unable to scan the
device '%s' - %s\n,
utils.c:fprintf(stderr, ERROR: unable to scan the device '%s'
- %s\n,
-
Signed-off-by: Anand Jain
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-restore.c | 4
1 file changed, 4 deletions(-)
diff --git a/cmds-restore.c b/cmds-restore.c
index 9385042..4a14f93 100644
--- a/cmds-restore.c
+++ b/cmds-restore.c
@@ -763,10 +763,6 @@ const char * const cmd_restore_usage
This patch adds 4th parameter to btrfs_scan_one_device()
which when set to non-zero value will traverse to check
backup super-block.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-show.c | 2 +-
btrfsctl.c| 2 +-
cmds-device.c | 4 ++--
cmds-filesystem.c | 4
btrfs-progs shouldn't be unconditionally trusting the backup superblocks
if the primary is garbage. It should only check the backups if the user
specifically asks it to.
Agreed. Let me add that all the rescue tools should accept a parameter
to pick the backup superblocks. Currently fsck -s,
As long as we integrate, broadcast and use single
keyword for a purpose I am fine with using xattr.
Patch using xattr was posted as well.
Just a note, potential applications using snapshot
label are:
- Yum, btrfs-progs, snapper, btrfs-gui,
Gnome-Nautilus-snapshot-plugin,
flags = BTRFS_SCAN_REGISTER | BTRFS_SCAN_PRIMARY_SB;
btrfs_scan_one_dir(/dev/, flags)
I just got too flexed into the current way of coding
in btrfs-progs :-)
But let me get at least this part of the code
in the right-way.
Thanks Eric for pointing out.
-Anand
--
To unsubscribe from
On 03/07/2013 08:11 PM, Swâmi Petaramesh wrote:
Hi,
mkfs.btrfs v0.20-rc1, as provided in the excellent Parted Magic tool,
latest version dated 2013/02/28, is broken :
When trying to mkfs.btrfs - even on newly made, FS-free partition, it
always spits an error that it cannot check partition
:
Accepts Eric and Zach review.
Seprates fix into 3 patches for easy logical understanding
Anand Jain (3):
btrfs-progs: Introduce flag BTRFS_SCAN_REGISTER to replace run_ioctl
btrfs-progs: Introduce flag BTRFS_SCAN_BACKUP_SB for
btrfs_read_dev_super
btrfs-progs: use
Introduce flag BTRFS_SCAN_REGISTER to replace the parameter run_ioctl
which controls calling the function btrfs_register_one_device().
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfsctl.c| 2 +-
cmds-device.c | 4 ++--
disk-io.c | 3 ++-
find-root.c | 3 ++-
utils.c
for
the backup SB when primary SB fails.
This patch just provides the frame-work, keeping all the logic
in the code same with or without this patch.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
disk-io.c | 10 +++---
disk-io.h | 3 ++-
find-root.c | 3 ++-
utils.h | 1 +
volumes.c
btrfs_scan_for_fsid(). To ensure rest of the logic is unaffected,
this patch will ensure BTRFS_SCAN_BACKUP_SB is set for all other
places except at check_mounted_where().
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c | 3 ++-
cmds-filesystem.c | 2 +-
cmds-replace.c| 3
Signed-off-by: Anand Jain anand.j...@oracle.com
---
.gitignore | 10 ++
1 file changed, 10 insertions(+)
diff --git a/.gitignore b/.gitignore
index 230dfbd..a32b96c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,13 @@ find-root
mkfs.btrfs
repair
restore
+btrfs-convert
+btrfs
-v2:
Accepts Eric and Zach review.
Separates fix into 3 patches for easy logical understanding
Anand Jain (3):
btrfs-progs: Introduce flag BTRFS_SCAN_REGISTER to replace run_ioctl
btrfs-progs: Introduce flag BTRFS_SCAN_BACKUP_SB for
btrfs_read_dev_super
btrfs-progs
Introduce flag BTRFS_SCAN_REGISTER to replace the parameter run_ioctl
which controls calling the function btrfs_register_one_device().
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfsctl.c| 2 +-
cmds-device.c | 4 ++--
disk-io.c | 3 ++-
find-root.c | 3 ++-
utils.c
for
the backup SB when primary SB fails.
This patch just provides the frame-work, keeping all the logic
in the code same with or without this patch.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
disk-io.c | 10 +++---
disk-io.h | 3 ++-
find-root.c | 3 ++-
utils.h | 1 +
volumes.c
Thanks Eric and David.
I have sent out V3 patch-set which will disable access
to backup super-block unless requested by the user.
here below are some test cases and results before and
after this fix.. which finds the patch works awesome.
the original problem which all this
Signed-off-by: Anand Jain anand.j...@oracle.com
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index a32b96c..3c9eba9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
*.static.o
.*.o.d
version.h
+version
man/*.gz
btrfs
btrfs.static
patch
[PATCH 3/3] btrfs-progs: disable using backup superblock by
default
v1-v2:
Accepts Eric and Zach review.
Separates fix into 3 patches for easy logical understanding
Anand Jain (3):
btrfs-progs: Introduce flag BTRFS_SCAN_REGISTER to replace run_ioctl
btrfs
Introduce flag BTRFS_SCAN_REGISTER to replace the parameter run_ioctl
which controls calling the function btrfs_register_one_device().
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfsctl.c| 2 +-
cmds-device.c | 4 ++--
disk-io.c | 3 ++-
find-root.c | 3 ++-
utils.c
Signed-off-by: Anand Jain anand.j...@oracle.com
---
disk-io.c | 2 +-
find-root.c | 2 +-
volumes.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/disk-io.c b/disk-io.c
index 796394f..c2e1c8a 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -880,7 +880,7 @@ static struct
for
the backup SB when primary SB fails.
This patch just provides the frame-work, keeping all the logic
in the code same with or without this patch.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
disk-io.c | 10 +++---
disk-io.h | 3 ++-
find-root.c | 3 ++-
utils.h | 1 +
volumes.c
Of recently and intermittently I am seeing open fail
for /dev/btrfs-control (btrfs is loaded), and there are no
dmesg errors, this may not be a complete help in digging
this issue but something which is necessary.
Thanks
Signed-off-by: Anand Jain anand.j...@oracle.com
---
utils.c | 3 ++-
1 file
Hi,
/dev/sdc does not contain btrfs SB at all..
---
# btrfs dev scan /dev/sdc
Scanning for Btrfs filesystems in '/dev/sdc'
ERROR: unable to scan the device '/dev/sdc' - Invalid argument
---
here appropriate error is something like
no btrfs found on dev
However btrfs_scan_one_device
/2013 07:46 PM, Anand Jain wrote:
Thanks Eric and David.
I have sent out V3 patch-set which will disable access
to backup super-block unless requested by the user.
here below are some test cases and results before and
after this fix.. which finds the patch works awesome
On 03/14/2013 12:36 PM, Eric Sandeen wrote:
On 3/13/13 10:05 PM, Anand Jain wrote:
maybe a little more commit log would be good?
So here is what confuses me now. :)
*every* caller of btrfs_read_dev_super() is now called with
0 for the flags variable, so it never reads the backup
under any
I think the common pattern here is that error details follow the
message, like
+ skipping device registration: %s\n,
I'll fix it here, if you don't mind.
Pls do. Thanks David.
-Anand
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body
maybe a little more commit log would be good?
So here is what confuses me now. :)
*every* caller of btrfs_read_dev_super() is now called with
0 for the flags variable, so it never reads the backup
under any circumstance.
If it's always called w/ 0, what is the point of the argument?
Is
As of now a common 'Invalid argument' return code is
for a set of 5 errors, that is misleading from
the end-user context.
Albeit the proposed return error codes are the closest
they might not be the perfect though. Since the idea is
at least if we use 'Invalid argument' only when no
# mkfs.btrfs /dev/sdb /dev/sdc -f mount /dev/sdb /btrfs
# ./check-mounted /dev/sdc
its btrfs
/dev/sdc is currently mounted. Aborting.
# dd if=/dev/zero of=/dev/sdc count=8 seek=$(((64 * 1024)/512))
# ./check-mounted /dev/sdc
what is ./check-mounted?
sorry forgot to mention.. check-mounted
Signed-off-by: Anand Jain anand.j...@oracle.com
---
Makefile | 6 +-
check-mounted.c | 31 +++
cmds-filesystem.c | 2 +-
3 files changed, 37 insertions(+), 2 deletions(-)
create mode 100644 check-mounted.c
diff --git a/Makefile b/Makefile
index
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index 2210020..f3d3130 100644
--- a/cmds-filesystem.c
+++ b/cmds-filesystem.c
@@ -446,7 +446,7 @@ static int cmd_defrag
with the flag O_EXCL set.
This patch also includes some (error) print format changes related
to the btrfs dev scan..
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c | 53 +++--
utils.c | 31 ---
2 files
What we really need is the right bits in the right places
to let the administrator know if a device looks like it might
be corrupt in need of fixing, vs. ignoring it altogether.
--
2. the current git btrfs-show and btrfs fi show both output
*different* devices for device with UUID
3.8.0+ #3
This happened after 'umount /btrfs' was interrupted by ctl-C
# mount | egrep btrfs
/dev/mapper/mpathe on /btrfs type btrfs (rw,degraded)
# cat /etc/mtab | egrep btrfs
/dev/mapper/mpathe /btrfs btrfs rw,degraded 0 0
# cat /proc/mounts | egrep btrfs
# umount /btrfs
umount: /btrfs:
Signed-off-by: Anand Jain anand.j...@oracle.com
---
root-tree.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/root-tree.c b/root-tree.c
index c10d068..4454147 100644
--- a/root-tree.c
+++ b/root-tree.c
@@ -69,6 +69,7 @@ int btrfs_update_root(struct btrfs_trans_handle *trans
understanding
Anand Jain (5):
btrfs-progs: make btrfs dev scan multi path aware
btrfs-progs: Introduce flag BTRFS_SCAN_REGISTER to replace run_ioctl
btrfs-progs: Introduce flag BTRFS_SCAN_BACKUP_SB for
btrfs_read_dev_super
btrfs-progs: introduce passing flags to btrfs_scan_one_device
btrfs
Introduce flag BTRFS_SCAN_REGISTER to replace the parameter run_ioctl
which controls calling the function btrfs_register_one_device().
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c | 4 ++--
disk-io.c | 3 ++-
find-root.c | 3 ++-
utils.c | 17
with the flag O_EXCL set.
This patch also includes some (error) print format changes related
to the btrfs dev scan..
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c | 53 +++--
utils.c | 31 ---
2 files
except for check_mounted rest of the function thread
should have the access to the backup SB disabled.
this patch will just do that.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
disk-io.c | 2 +-
find-root.c | 2 +-
utils.c | 2 +-
volumes.c | 2 +-
4 files changed, 4 insertions
to backup SB disable.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-replace.c | 2 +-
disk-io.c | 2 +-
find-root.c| 3 ++-
utils.c| 9 ++---
volumes.c | 2 +-
volumes.h | 2 +-
6 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/cmds-replace.c b
for
the backup SB when primary SB fails.
This patch just provides the frame-work, keeping all the logic
in the code same with or without this patch.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
disk-io.c | 10 +++---
disk-io.h | 3 ++-
find-root.c | 3 ++-
utils.h | 1 +
volumes.c
Any review comments on this ? pls.
Thanks, Anand
On 27/03/2013 18:07, Anand Jain wrote:
We need a mechanism to tell when to use the backup super_block.
To do this it needs a frame-work, and the patch #2 and #3 below
provides the same without change in the logic.
Its been found and posted
and get_btrfs_mount has replaced it
Signed-off-by: Anand Jain anand.j...@oracle.com
---
utils.c | 35 ---
1 file changed, 35 deletions(-)
diff --git a/utils.c b/utils.c
index b9b675d..0a4a971 100644
--- a/utils.c
+++ b/utils.c
@@ -976,41 +976,6 @@ out_mntloop_err
701 - 800 of 3004 matches
Mail list logo