Is there a way to reset the device
error count?
there is -z, is it not what you are looking for ?
--
# btrfs dev stat --help
usage: btrfs device stats [-z] path|device
Show current device IO stats. -z to reset stats afterwards.
thanks, Anand
--
To unsubscribe from this list:
I tried btrfsck --repair,
I am not indicating this is the cause but, kindly note that
btrfsck --repair has a bug which it will let kernel to reset
the uuid of the root.
the fix is at:
[PATCH] btrfs-progs: root_item generation_v2 is out of sync after btrfsck
Thanks, Anand
--
To
Did something break.. ? we are not reporting raid type after balance.
---
# btrfs fi df /btrfs
Data, RAID0: total=2.00GB, used=2.03MB
Data: total=8.00MB, used=0.00
System, RAID0: total=16.00MB, used=4.00KB
System: total=4.00MB, used=0.00
Metadata, RAID0: total=2.00GB, used=216.00KB
--
mkfs.btrfs /dev/dm-4 -f
mkfs.ext4 /dev/dm-4 -- corrupt the primary SB
--
as of now
--
btrfs fi label /dev/dm-4 test
btrfs fi label /dev/dm-4
test
--
is successful since its using backup super block
by default, is this fine ?
Thanks, Anand
--
To unsubscribe from this list: send
BTRFS_SCAN_BACKUP_SB flag in
btrfs_scan_one_device
Introduced a new 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 (5
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 | 20
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
except for check_mounted
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(+), 4 deletions(-)
diff --git a/disk-io.c b/disk-io.c
index 82c3b66..589b37a 100644
--- a/disk-io.c
+++ b
since idea is to scan and report all the sb in the
dev, we should let it so look for backup SB by setting
the flag BTRFS_SCAN_BACKUP_SB
Signed-off-by: Anand Jain anand.j...@oracle.com
---
find-root.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/find-root.c b/find
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
Hi David, all
kindly review/accept this patch set to fix various
bugs as in the patch.
This patch set is on top David's integration-20130321
branch and would apply nicely on top the backup sb
fixes which was sent separately.
Thanks
Anand
Anand Jain (9
.
btrfs-debug-tree shows change in uuid
root data bytenr 29425664 level 0 dirid 0 refs 1 gen 43
uuid 293596e8-7888-eb4c-9134-6df9db996fe5
Signed-off-by: Anand Jain anand.j...@oracle.com
---
root-tree.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/root
, RFC] btrfs-progs: overhaul mkfs.btrfs -r option
Signed-off-by: Anand Jain anand.j...@oracle.com
merge with prev
Signed-off-by: Anand Jain anand.j...@oracle.com
---
mkfs.c | 149 ++---
1 file changed, 69 insertions(+), 80 deletions
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 21483b8..9c5dbf4 100644
--- a/utils.c
+++ b/utils.c
@@ -976,41 +976,6 @@ out_mntloop_err
After:
::
fs created label (null) on /dev/dm-2 id 1
nodesize 4096 leafsize 4096 sectorsize 4096 size 59.99GB
adding device /dev/dm-3 id 2
adding device /dev/dm-4 id 3
adding device /dev/dm-5 id 4
Btrfs v0.20-rc1-235-gdd21bc1
Signed-off-by: Anand Jain anand.j...@oracle.com
a very trivial fix
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-scrub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmds-scrub.c b/cmds-scrub.c
index 5922361..ebb0dc9 100644
--- a/cmds-scrub.c
+++ b/cmds-scrub.c
@@ -1465,7 +1465,7 @@ out:
}
static const
Having no balance running/ paused/completed is a normal
situation, so the current output message should be positive
with return val zero.
As of now:
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-balance.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/cmds
when we have to report no such file error for
/dev/btrfs-control we could confirm if btrfs kernel
module is loaded and report it and skip registration
where appropriate
Further this patch pretty prints the dev scan results.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c | 56
for this purpose __test_dev_for_mkfs is moved to
utils.c and renamed to test_dev_for_mkfs
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-replace.c | 24 ++--
mkfs.c | 122 +
utils.c| 121
Trivial patch:
./btrfs-progs/btrfs-select-super -s 0 /dev/sdc
using SB copy 0, bytenr 65536
No valid Btrfs found on /dev/sdc
Open ctree failed
The line 'using..' is confusing which gives an
indication that command is successful
This patch will avoid that when command fails
Signed-off-by: Anand
a very trivial fix
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-scrub.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmds-scrub.c b/cmds-scrub.c
index 5922361..32fcc20 100644
--- a/cmds-scrub.c
+++ b/cmds-scrub.c
@@ -1465,7 +1465,7 @@ out:
}
static
a very trivial fix
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-scrub.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmds-scrub.c b/cmds-scrub.c
index 5922361..c0dc584 100644
--- a/cmds-scrub.c
+++ b/cmds-scrub.c
@@ -1465,7 +1465,7 @@ out:
}
static
Hi,
the below example tells a problem..
# btrfs dev del missing /btrfs
ERROR: error removing the device 'missing' - Invalid argument
# dmesg | tail
::
[ 4295.258686] btrfs: unable to go below two devices on raid1
#
-
as of now the more accurate errors are being logged to
On 04/08/2013 11:22 PM, David Sterba wrote:
On Thu, Mar 21, 2013 at 07:56:44PM +0800, Anand Jain wrote:
We should avoid using non multi-path (mp) path for mp disks
As of now there is no good way (like api) to check that.
A workaround way is to check if the O_EXCL open is unsuccessful
On 04/09/2013 07:12 PM, David Sterba wrote:
On Mon, Apr 08, 2013 at 05:22:38PM +0200, David Sterba wrote:
+ fd = open(/dev/btrfs-control, O_RDWR);
+ e = errno;
+ if (fd 0) {
+ FILE *mfd = popen(lsmod | grep btrfs, r);
Please transform this into C.
Actually,
when we have to report no such file error for
/dev/btrfs-control we could confirm if btrfs kernel
is present and report it and skip registration
where appropriate
v1-v2: use /proc/filesystems to check if the btrfs
is present
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c | 56
This patch is replaced By:
btrfs-progs: avoid ioctl for multipath-dev with its non-multipath path
which is also sent to this mailing list.
thanks, Anand
On 03/27/2013 06:07 PM, Anand Jain wrote:
We should avoid using non multi-path (mp) path for mp disks
As of now there is no good
with the flag O_EXCL set.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
utils.c | 30 +-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/utils.c b/utils.c
index 3308668..0231677 100644
--- a/utils.c
+++ b/utils.c
@@ -1105,6 +1105,13 @@ again
/dev/sdc is currently mounted. Aborting.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
disk-io.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/disk-io.c b/disk-io.c
index 589b37a..3f85c21 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -1138,9 +1138,12 @@ int
On 04/12/2013 11:57 PM, David Sterba wrote:
On Fri, Apr 05, 2013 at 01:54:56PM +0800, Anand Jain wrote:
--- a/cmds-balance.c
+++ b/cmds-balance.c
@@ -662,8 +662,12 @@ static int cmd_balance_status(int argc, char **argv)
close(fd);
if (ret 0) {
+ if (e
v1-v2:
Accepts the review comments from David
Accepts the review comments from Stefan
Rebase changes
Adds the 10/11 and 11/11 which was outside this patch-set
Anand Jain (11):
btrfs-progs: root_item generation_v2 is out of sync after btrfsck
btrfs-progs
.
btrfs-debug-tree shows change in uuid
root data bytenr 29425664 level 0 dirid 0 refs 1 gen 43
uuid 293596e8-7888-eb4c-9134-6df9db996fe5
Signed-off-by: Anand Jain anand.j...@oracle.com
---
root-tree.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/root
Having no balance running/ paused/completed is a normal
situation, so the current output message should be positive
with return val zero.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-balance.c | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/cmds
, RFC] btrfs-progs: overhaul mkfs.btrfs -r option
Signed-off-by: Anand Jain anand.j...@oracle.com
to merg prev
Signed-off-by: Anand Jain anand.j...@oracle.com
---
mkfs.c | 192 +++-
utils.c | 128
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 67419da..926421c 100644
--- a/utils.c
+++ b/utils.c
@@ -977,41 +977,6 @@ out_mntloop_err
a very trivial fix
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-scrub.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmds-scrub.c b/cmds-scrub.c
index 5922361..c0dc584 100644
--- a/cmds-scrub.c
+++ b/cmds-scrub.c
@@ -1465,7 +1465,7 @@ out:
}
static
/dev/sdc is currently mounted. Aborting.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
disk-io.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/disk-io.c b/disk-io.c
index 589b37a..3f85c21 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -1138,9 +1138,12 @@ int
with the flag O_EXCL set.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
utils.c | 30 +-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/utils.c b/utils.c
index 926421c..158912c 100644
--- a/utils.c
+++ b/utils.c
@@ -1105,6 +1105,13 @@ again
when we have to report no such file error for
/dev/btrfs-control we could confirm if btrfs kernel
is present and report it and skip registration
where appropriate
v1-v2: use /proc/filesystems to check if the btrfs
is present
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c | 60
Trivial patch:
./btrfs-progs/btrfs-select-super -s 0 /dev/sdc
using SB copy 0, bytenr 65536
No valid Btrfs found on /dev/sdc
Open ctree failed
The line 'using..' is confusing which gives an
indication that command is successful
This patch will avoid that when command fails
Signed-off-by: Anand
-by: Anand Jain anand.j...@oracle.com
---
cmds-replace.c | 23 ---
1 file changed, 4 insertions(+), 19 deletions(-)
diff --git a/cmds-replace.c b/cmds-replace.c
index ab34388..4e881b7 100644
--- a/cmds-replace.c
+++ b/cmds-replace.c
@@ -137,12 +137,11 @@ static int
After:
::
fs created label (null) on /dev/dm-2 id 1
nodesize 4096 leafsize 4096 sectorsize 4096 size 59.99GB
adding device /dev/dm-3 id 2
adding device /dev/dm-4 id 3
adding device /dev/dm-5 id 4
Btrfs v0.20-rc1-235-gdd21bc1
Signed-off-by: Anand Jain anand.j...@oracle.com
Oh. this title prefix should be v2 not RESEND.
v1-v2
Accepts David review comments
Thanks, Anand
On 04/15/2013 02:38 PM, Anand Jain wrote:
Having no balance running/ paused/completed is a normal
situation, so the current output message should be positive
with return val zero.
Signed-off
On 04/13/2013 12:06 AM, David Sterba wrote:
On Fri, Apr 05, 2013 at 01:54:57PM +0800, Anand Jain wrote:
In the cases where one of the disk is not suitable for
btrfs, then we would fail the mkfs, however we determine
that after we have written btrfs to the preceding disks.
At this time if user
when we have to report no such file error for
/dev/btrfs-control we could confirm if btrfs kernel
is present and report it and skip registration
where appropriate
v2-v3:
accept review comments from David
v1-v2: use /proc/filesystems to check if the btrfs
is present
Signed-off-by: Anand
Having no balance running/ paused/completed is a normal
situation, so the current output message should be positive
with return val zero.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-balance.c | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git
On 04/16/2013 12:21 AM, David Sterba wrote:
On Mon, Apr 15, 2013 at 02:38:08PM +0800, Anand Jain wrote:
+/* Checks the status of the balance if any
+ * return codes:
+ * -1 : Error failed to know if there is any pending balance
+ * 1 : Successful to know status of a pending balance
Signed-off-by: Anand Jain anand.j...@oracle.com
---
volumes.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/volumes.c b/volumes.c
index b555ded..7a9b6f0 100644
--- a/volumes.c
+++ b/volumes.c
@@ -1643,15 +1643,6 @@ static int read_one_dev(struct btrfs_root *root,
return ret
On 04/16/2013 07:57 PM, David Sterba wrote:
On Fri, Apr 12, 2013 at 03:55:06PM +0800, Anand Jain wrote:
If one of the copy of the superblock is zero it does not
confirm to us that btrfs isn't there on that disk. When
we are having more than one copy of superblock we should
rather let
If one of the copy of the superblock is zero it does not
confirm to us that btrfs isn't there on that disk. When
we are having more than one copy of superblock we should
rather let the for loop to continue to check other copies.
the following test case and results would justify the
fix
Another reproducer is reporting the same effect. as below.
mkfs.btrfs /dev/dm-2 /dev/dm-4 -f -m raid1 -d raid1
x=0 0 3 0; echo scsi remove-single-device $x /proc/scsi/scsi
mount -o degraded /dev/dm-2 /btrfs
btrfs fi show
Label: none uuid: 8ae8e37e-9f04-4a90-9c85-0c75a7622405
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-subvolume.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index 74e2130..e3b8032 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -800,16 +800,18 @@ static int
yeah we should set the v2 parameter at all the place where
we call btrfs_set_root_generation. Sorry it slipped my mind.
Thanks for the fix.
Thanks, Anand
On 04/22/2013 01:01 PM, Eric Sandeen wrote:
With this integration branch commit in place:
2bd1169 btrfs-progs: root_item
/*
- * If the btrfs-progs is newer and kernel is at
- * generation_v1 then we don't touch v2 items
- * otherwise when kernel is at same or greater
- * version compared with btrfs-progs then update
- * the needed
- */
- old_size =
With commit
87c09f7 Btrfs-progs: fix memory leaks on cleanup
mkfs on multiple dev is ending with segfault at
close_all_devices() during kfree(device-name)
because mkfs calls btrfs_add_to_fsid, which does not initialize
name when dev is added to the list.
Signed-off-by: Anand Jain
With commit
87c09f7 Btrfs-progs: fix memory leaks on cleanup
mkfs on multiple dev is ending with segfault at
close_all_devices() during kfree(device-name)
because mkfs calls btrfs_add_to_fsid, which does not initialize
name when dev is added to the list.
Signed-off-by: Anand Jain
As showed in the previous email in this thread, we need to get
the error string from the kernel to the cli to improve the
usability of the product.
As also said, I was looking at two way which I think we could
do this, here I take the 2nd approach which is to pass the error
string though
add another parameter to the ioctl arg structure to carry the error string
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c | 13 +
ioctl.h | 9 -
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/cmds-device.c b/cmds-device.c
index
adds a parameter in the ioctl arg struct to carry the error string
Signed-off-by: Anand Jain anand.j...@oracle.com
---
fs/btrfs/ioctl.c | 42 +++---
fs/btrfs/volumes.c | 29 +++--
fs/btrfs/volumes.h | 2
If you want to make this give you more
specific errors then adjust the errno's we send back and make the userspace util
translate those to their appropriate error. Thanks,
Thats the approach #1 as listed before in this mail thread,
let me give a try.
Anand
--
To unsubscribe from this
Thanks Stefan.
::
About the issue you mentioned, that you need to change the kernel and
the user mode at the same time:
You can keep it compatible. Just do not delete the old kernel interface.
The user mode program could try the new interface first, and if it
fails, fall back to the old
, Anand
On 04/26/2013 05:39 PM, Anand Jain wrote:
As showed in the previous email in this thread, we need to get
the error string from the kernel to the cli to improve the
usability of the product.
As also said, I was looking at two way which I think we could
do this, here I take the 2nd
v1-v2:
introduce error codes for the device mgmt usage
v1:
adds a parameter in the ioctl arg struct to carry the error string
Signed-off-by: Anand Jain anand.j...@oracle.com
---
fs/btrfs/ioctl.c | 22 +++---
fs/btrfs/volumes.c | 26
v1-v2:
introduce error codes for the device mgmt usage
v1:
add another parameter to the ioctl arg structure to carry the error string
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c | 10 --
ioctl.h | 37 +
2 files changed, 45
.
(it was inconsistent (across disks) because btrfs dev scan
provided a different path from the mount command eg. below)
devid1 size 1.98GiB used 435.00MiB path /dev/mapper/mpatha
devid2 size 2.00GiB used 415.00MiB path /dev/dm-1
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c |2 +-
utils.c |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmds-device.c b/cmds-device.c
index 1315918..6f32356 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -203,7 +203,7 @@ static int
preview as below..
Label: none uuid: 26d539a5-8968-4cf0-b4b5-5fd50105f8a0 mounted: /btrfs
Group profile: Metadata: single Metadata: DUP Data: single
It would look better if the profile types are grouped together,
As of now mkfs.btrfs and balance don't agree on the same set
of
The reason is simple, for my
convenience I've added the user to the 'disk' group so I can access the
block devices without root. This patch stops to read the block devs
directly and uses the ioctl BTRFS_IOC_FS_INFO which gives me a silent
EPERM.
If I run show with sudo, then all filesystems
get_btrfs_mount is reusable function but it is printing
errors, this removes it. Here the parent function of
open_path_or_dev_mnt does print error msg on error.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
utils.c |6 ++
utils.h |1 +
2 files changed, 3 insertions(+), 4
Originally, thinking was user will use mount point if the disk
is mounted. But thats not really true, actually user don't
(or shouldn't) care to check if disk mounted, so whether disk
is mounted/unmounted when disk path is specified it should work.
Signed-off-by: Anand Jain anand.j...@oracle.com
On 10/21/13 10:44 PM, Josef Bacik wrote:
On Tue, Oct 15, 2013 at 07:13:33PM +0200, David Sterba wrote:
On Tue, Oct 08, 2013 at 11:41:38AM +0800, Anand Jain wrote:
As of now btrfs filesystem show reads directly from
disks. So sometimes output can be stale, mainly when
user wants to cross
As I remember, there was no code to handle the look up by label.
it was a dummy option which did nothing.
So the below commit removed the option.
--
commit 50eaae45f2b47643f9a4c43ce72f7d6e06d4e323
Author: Anand Jain anand.j...@oracle.com
Date: Mon Jul 15 13:30:48 2013 +0800
btrfs
On 10/22/13 10:33 PM, David Sterba wrote:
On Tue, Oct 22, 2013 at 01:53:22PM +0800, Anand Jain wrote:
@@ -386,7 +395,7 @@ static int btrfs_scan_kernel(void *search)
static const char * const cmd_show_usage[] = {
- btrfs filesystem show [options] [path|uuid],
+ btrfs filesystem
On 10/22/13 10:43 PM, David Sterba wrote:
On Tue, Oct 22, 2013 at 01:53:21PM +0800, Anand Jain wrote:
get_btrfs_mount is reusable function but it is printing
errors, this removes it. Here the parent function of
open_path_or_dev_mnt does print error msg on error.
Yeah, but then each caller
On 10/23/13 12:52 AM, David Sterba wrote:
On Tue, Oct 22, 2013 at 09:21:47AM -0400, Josef Bacik wrote:
Did you test these? Because they aren't working for me, so I think a revert is
the only solution. Thanks,
The impact of the failing test is imho not that big to justify a full
revert
On 10/23/13 12:52 AM, David Sterba wrote:
On Tue, Oct 22, 2013 at 09:21:47AM -0400, Josef Bacik wrote:
Did you test these? Because they aren't working for me, so I think a
revert is
the only solution. Thanks,
The impact of the failing test is imho not that big to justify a full
revert
with design revamp around filesystem show the fsid filter
by label wasn't planned. but apparently that seemed to be
necessary. this patch will fix it.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 120 -
1 files
is planned.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
ioctl.h | 19 +++
utils.c | 80 +++
utils.h |1 +
3 files changed, 100 insertions(+), 0 deletions(-)
diff --git a/ioctl.h b/ioctl.h
index d21413f..29575d8
as of now with out this patch user would see
fsinfo per btrfs mount path but which mean multiple
entry if more than one subvol is mounted of the same
fsid. so this patch will handle that nicely.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 90
This adds ioctl BTRFS_IOC_GET_FSIDS which reads the fs
info through the btrfs-control
Signed-off-by: Anand Jain anand.j...@oracle.com
---
fs/btrfs/super.c | 47 ++-
fs/btrfs/volumes.c | 33 ++
fs/btrfs
-by: Anand Jain anand.j...@oracle.com
---
ioctl.h | 19 +++
utils.c | 80 +++
utils.h |1 +
3 files changed, 100 insertions(+), 0 deletions(-)
diff --git a/ioctl.h b/ioctl.h
index d21413f..29575d8 100644
--- a/ioctl.h
+++ b
.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 52 +---
1 files changed, 49 insertions(+), 3 deletions(-)
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index fcabdb0..3a494fd 100644
--- a/cmds-filesystem.c
+++ b/cmds
This adds ioctl BTRFS_IOC_GET_FSIDS which reads the fs
info through the btrfs-control
v2: accepts Zach suggested
now holds uuid_mutex
Signed-off-by: Anand Jain anand.j...@oracle.com
---
fs/btrfs/super.c | 66
fs/btrfs/volumes.c
: accepts Josef suggested
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 59 +---
1 files changed, 55 insertions(+), 4 deletions(-)
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index f8e8475..f40178a 100644
--- a/cmds
as of now with out this patch user would see
fsinfo per btrfs mount path but which mean multiple
entry if more than one subvol is mounted of the same
fsid. so this patch will handle that nicely.
v2: accepts Zach suggested
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c
with design revamp around filesystem show the fsid filter
by label wasn't planned. but apparently that seemed to be
necessary. this patch will fix it.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 120 -
1 files
-by: Anand Jain anand.j...@oracle.com
---
ioctl.h | 19 +++
utils.c | 80 +++
utils.h |1 +
3 files changed, 100 insertions(+), 0 deletions(-)
diff --git a/ioctl.h b/ioctl.h
index d21413f..29575d8 100644
--- a/ioctl.h
+++ b
(sorry for the delay, various external issues)
I have sent out the new patch set. Thanks for the comments.
more inline.
On 10/30/13 05:33 AM, Zach Brown wrote:
This adds ioctl BTRFS_IOC_GET_FSIDS which reads the fs
info through the btrfs-control
Why not use sysfs?
various sysfs
Thanks for the comments. Sorry for the delay. more inline
below. V2 has been sent out.
On 10/30/13 12:40 AM, Josef Bacik wrote:
On Wed, Oct 30, 2013 at 12:34:50AM +0800, Anand Jain wrote:
A new test case when disk is unmounted and if the non mapper
disk path is given as the argument
This adds ioctl BTRFS_IOC_GET_FSIDS which reads the fs
info through the btrfs-control
v2: accepts Zach suggested
now holds uuid_mutex
Signed-off-by: Anand Jain anand.j...@oracle.com
---
fs/btrfs/super.c | 66
fs/btrfs/volumes.c
: accepts Josef suggested
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 59 +---
1 files changed, 55 insertions(+), 4 deletions(-)
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index f8e8475..f40178a 100644
--- a/cmds
I had just retained whats in the original. But this is
good change. Thanks Eric.
Reviewed-by: Anand Jain anand.j...@oracle.com
On 11/07/2013 07:15 AM, Eric Sandeen wrote:
get_df returns -ERRNO, or maybe (+)errno, or even 0 in
the case where we inexplicably got 0 total_spaces from
From: Eric Sandeen sand...@redhat.com
Use strncpy(... ,PATH_MAX) to be sure we don't overflow
the path[PATH_MAX] array.
Resolves-Coverity-CID: 1125941
Signed-off-by: Eric Sandeen sand...@redhat.com
Signed-off-by: Anand Jain anand.j...@oracle.com
---
utils.c |4 ++--
1 files changed, 2
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-send.c |2 +-
utils.c |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmds-send.c b/cmds-send.c
index 53e9a53..43ea06b 100644
--- a/cmds-send.c
+++ b/cmds-send.c
@@ -72,7 +72,7 @@ int find_mount_root(const
Reviewed-by: Anand Jain anand.j...@oracle.com
On 11/07/2013 07:15 AM, Eric Sandeen wrote:
find_mount_root() tries to test for realpath() failure, but
tests the wrong value. Fix it.
Resolves-Coverity-CID: 1125940
Signed-off-by: Eric Sandeen sand...@redhat.com
---
cmds-send.c |2 +-
1
Reviewed-by: Anand Jain anand.j...@oracle.com
On 11/07/2013 07:15 AM, Eric Sandeen wrote:
Close fd before we return on error paths.
Resolves-Coverity-CID: 1125939
Signed-off-by: Eric Sandeen sand...@redhat.com
---
utils.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff
Reviewed-by: Anand Jain anand.j...@oracle.com
On 11/07/2013 07:15 AM, Eric Sandeen wrote:
The error return from open is -1, so test that, not 0,
for success/failure.
Resolves-Coverity-CID: 1125931
Signed-off-by: Eric Sandeen sand...@redhat.com
---
cmds-filesystem.c |4 ++--
1 files
Reviewed-by Anand Jain anand.j...@oracle.com
On 11/07/2013 07:15 AM, Eric Sandeen wrote:
get_df returns a negative error number, but then
we pass it to strerror, which wants a positive value...
Resolves-Coverity-CID: 1125929
Signed-off-by: Eric Sandeen sand...@redhat.com
---
cmds
reviewed-by: Anand Jain anand.j...@oracle.com
On 11/07/2013 07:15 AM, Eric Sandeen wrote:
Even if it's definitely btrfs at this point,
btrfs_scan_one_device could fail for other reasons.
Check the return value, warn if it fails, and skip
the device register.
Resolves-Coverity-CID: 1125925
: accepts Josef suggested
v2: accepts Josef suggested
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 59 +---
1 files changed, 55 insertions(+), 4 deletions(-)
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index
801 - 900 of 3004 matches
Mail list logo