is given, structure of all present filesystems is shown
-K list both mounted and unmounted/stale btrfs as per kernel
-k list mounted btrfs as known to the kernel.
-
Anand Jain (1):
btrfs: add framework to read fs info and dev info from the kernel
fs/btrfs/super.c | 87
the kernel
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 92 ++--
ioctl.h | 60 -
utils.c | 153 ++
utils.h | 2 +
4 files changed, 303 insertions
information and
its device information. Also the frame work provided here is
easily extensible to retrieve any other structure as future
needs.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
fs/btrfs/super.c | 87 ++
fs/btrfs/volumes.c | 86
:
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 +++---
include
:
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 | 43 ++-
2 files changed, 50
it would congregate btrfs-disk scans at the function
scan_devs_for_btrfs, adds /dev/mapper to be used to scan
for btrfs, and updates its calling functions and few bug fixes.
Anand Jain (4):
btrfs-progs: replace filesystem show --all-devices with -d option
btrfs-progs: label option in btrfs
So update the usage and man page
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 2 +-
man/btrfs.8.in| 8
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index 6ba27ad..470de31 100644
--- a/cmds
btrfs_scan_for_fsid uses only one argument run_ioctl out of 3
so remove the rest two of them
and also update to use the new function
scan_devs_for_btrfs
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-find-root.c | 2 +-
disk-io.c | 2 +-
utils.c | 12
to be consistent
with them.
This patch uses the /dev/mapper on top of scanning
/proc/partitions and updates paths with /dev/mapper
paths where available (which takes care if some of
the disks is under blacklist).
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c | 50
The btrfs fi show --all-devices is odd man out as compared to the
rest of the command line options with in btrfs-progs. So match it
with the btrfs-progs symantics
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 18 ++
man/btrfs.8.in| 6 +++---
2 files
On 17/05/2013 19:21, Gabriel de Perthuis wrote:
On Fri, 17 May 2013 18:54:38 +0800, Anand Jain wrote:
The idea was to introduce /dev/mapper to find for btrfs disk,
However I found first we need to congregate the disk scan
procedure at a function so it would help to consistently tune
it across
This is fixed with patch
[PATCH] Btrfs: compare relevant parts of delayed tree refs
in 3.9 upgrade should help.
On 21/05/2013 16:37, Joeri Vanthienen wrote:
Hi all,
I tried to replace a failed device in a btrfs filesystem on Linux kernel 3.8.4.
After adding a new harddisk (/dev/sdf) to
/dev/mapper/mpathbp1
[1118885.474077] device fsid 0a62-ad84-4d80-842a-dd9c1c60bf51 devid 2
transid 103 /dev/mapper/mpathd
[1118885.474133] device fsid 0a62-ad84-4d80-842a-dd9c1c60bf51 devid 1
transid 103 /dev/mapper/mpathe
-
Anand Jain (6):
btrfs-progs: btrfs_scan_for_fsid doesn't
btrfs_scan_for_fsid uses only one argument run_ioctl out of 3
so remove the rest two of them
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-find-root.c | 2 +-
disk-io.c | 2 +-
utils.c | 5 ++---
utils.h | 3 +--
4 files changed, 5 insertions(+), 7
appears to be a cut and paste error
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 2 +-
man/btrfs.8.in| 8
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index f41a72a..c6a7100 100644
--- a/cmds
the btrfs device scan usage does not publish --all-devices
option so add it
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmds-device.c b/cmds-device.c
index 41e79d3..d25159b 100644
--- a/cmds-device.c
+++ b
tweaking it.
the patch which recommends to use /dev/mapper
will also need it
thanks
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c | 11 +++
cmds-filesystem.c | 9 +++--
utils.c | 18 ++
utils.h | 5 -
4 files changed, 28
1 size 15.00GB used 2.04GB path /dev/mapper/mpathbp1
In the long run I want the usage of /dev/mapper path
along with /proc/partitions be the default option to
scan for the btrfs devs. /proc/partitions must be scanned
as well because to include the mapper blacklisted devs.
Signed-off-by: Anand
to scan /dev/mapper we want to avoid skipping
links otherwise we would be left with nothing.
This patch just adds the check if we are scanning devs
ONLY under /dev/mapper if when so it will not skip links
Thanks
Signed-off-by: Anand Jain anand.j...@oracle.com
---
utils.c | 8 ++--
1 file changed
tweaking it.
the patch which recommends to use /dev/mapper
will also need it
v3:
bring in btrfs_scan_for_fsid to use scan_for_btrfs
thanks
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c | 11 +++
cmds-filesystem.c | 9 +++--
utils.c | 22
btrfs_scan_for_fsid uses only one argument run_ioctl out of 3
so remove the rest two of them
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-find-root.c | 2 +-
disk-io.c | 2 +-
utils.c | 5 ++---
utils.h | 3 +--
4 files changed, 5 insertions(+), 7
/dev/mapper/mpathe
-
Anand Jain (9):
btrfs-progs: btrfs_scan_for_fsid doesn't need all the arguments
btrfs-progs: label option in btrfs filesystem show is not coded
btrfs-progs: update device scan usage
btrfs-progs: congregate dev scan
btrfs-progs: btrfs_scan_one_dir not to skip links
1 size 15.00GB used 2.04GB path /dev/mapper/mpathbp1
In the long run I want the usage of /dev/mapper path
along with /proc/partitions be the default option to
scan for the btrfs devs. /proc/partitions must be scanned
as well because to include the mapper blacklisted devs.
Signed-off-by: Anand
to scan /dev/mapper we want to avoid skipping
links otherwise we would be left with nothing.
This patch just adds the check if we are scanning devs
ONLY under /dev/mapper if when so it will not skip links
Thanks
Signed-off-by: Anand Jain anand.j...@oracle.com
---
utils.c | 8 ++--
1 file changed
appears to be a cut and paste error
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 2 +-
man/btrfs.8.in| 8
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index f41a72a..c6a7100 100644
--- a/cmds
tweaking it.
the patch which recommends to use /dev/mapper
will also need it
v3:
bring in btrfs_scan_for_fsid to use scan_for_btrfs
thanks
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c | 11 +++
cmds-filesystem.c | 9 +++--
utils.c | 22
the btrfs device scan usage does not publish --all-devices
option so add it
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmds-device.c b/cmds-device.c
index 41e79d3..d25159b 100644
--- a/cmds-device.c
+++ b
:
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 | 43 ++-
2 files changed, 50
-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 7 +-
ctree.h | 1 -
ioctl.h | 64 ++
utils.c | 244 ++
utils.h | 4 +
volumes.c | 20 -
volumes.h | 3
information and
its device information. Also the frame work provided here is
easily extensible to retrieve any other structure as future
needs.
v1-v2:
.code optimized
.get the device generation number as well, so that
btrfs-progs could print using print_one_uuid
Signed-off-by: Anand Jain anand.j
Anand Jain (2):
btrfs: device delete to get errors from the kernel
btrfs: add framework to read fs info and dev info from the kernel
fs/btrfs/ioctl.c | 22
fs/btrfs/super.c | 100 +---
fs/btrfs/volumes.c | 125
On 06/11/2013 03:40 AM, Josef Bacik wrote:
On Mon, Jun 10, 2013 at 08:59:15AM -0600, Anand Jain wrote:
This adds two ioctl BTRFS_IOC_GET_FSIDS and BTRFS_IOC_GET_DEVS
which reads the btrfs_fs_devices and btrfs_device structure
from the kernel respectively.
The information in these structure
On 06/11/2013 04:00 AM, Eric Sandeen wrote:
On 6/10/13 9:56 AM, Anand Jain wrote:
btrfs_scan_for_fsid uses only one argument run_ioctl out of 3
so remove the rest two of them
and run_ioctl is only ever '1' (and it's completely unobvious
at the call point what '1' means
On 06/11/2013 04:30 AM, Zach Brown wrote:
On Mon, Jun 10, 2013 at 10:59:15PM +0800, Anand Jain wrote:
This adds two ioctl BTRFS_IOC_GET_FSIDS and BTRFS_IOC_GET_DEVS
which reads the btrfs_fs_devices and btrfs_device structure
from the kernel respectively.
Why not just use sysfs to export
Per wiki an idea seems to maintain same code (probably
as much as possible) between btrfs-progs and btrfs
There must have been a/few critical advantage, but
what are they ?
Thanks, Anand
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message
Because they work with the same on-disk structures, and need
to perform many of the same tasks. So using the same code base
means bugs get fixed once, features get written once, there is
built-in consistency, more coverage, etc.
yes. Thanks Eric.
- Anand
--
To unsubscribe from this list:
TREE_SEARCH ioctl doesn't help in this case
the dev item don't provide all the info
that btrfs-progs might need in the long run
(and even the current needs).
Thanks, Anand
On 06/11/2013 10:24 PM, Josef Bacik wrote:
On Mon, Jun 10, 2013 at 08:59:15AM -0600, Anand Jain wrote:
This adds two
the kernel
Signed-off-by: Anand Jain anand.j...@oracle.com
---
fs/btrfs/ioctl.c | 16 ++--
include/uapi/linux/btrfs.h | 3 ++-
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 0e7bcc5..082c9fc 100644
--- a/fs/btrfs
This would help to reuse the function
v1-v2: removed static and updated .h file, in a preparation
work for the following patch
Signed-off-by: Anand Jain anand.j...@oracle.com
---
utils.c | 18 +-
utils.h | 1 +
2 files changed, 14 insertions(+), 5 deletions(-)
diff
This is a prepatory work for the following btrfs fi show command
fixes. So that we have a function get_df to get the fs sizes.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 146 +-
1 file changed, 79 insertions(+), 67
Code can be well reused and this is the prepatory work
for the patch following this.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 83 ---
ctree.h | 11
2 files changed, 59 insertions(+), 35
this is preparatory so that fsid found in the kernel can be
added
Signed-off-by: Anand Jain anand.j...@oracle.com
---
volumes.c | 20 +++-
volumes.h | 3 +++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/volumes.c b/volumes.c
index aa1c3dd..81904c6 100644
.
btrfs-progs: function to release a specific fsid from the list
btrfs-progs: move out print in cmd_df to another function
btrfs-progs: get string for the group profile and type
btrfs-progs: obtain used_bytes in BTRFS_IOC_FS_INFO ioctl
Anand Jain (13):
btrfs-progs: btrfs_scan_for_fsid doesn't
optimized to remove redundancy
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 44
volumes.c | 28
volumes.h | 2 ++
3 files changed, 70 insertions(+), 4 deletions(-)
diff --git
Signed-off-by: Anand Jain anand.j...@oracle.com
---
ioctl.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ioctl.h b/ioctl.h
index a40a4a1..d035201 100644
--- a/ioctl.h
+++ b/ioctl.h
@@ -169,7 +169,8 @@ struct btrfs_ioctl_fs_info_args {
__u64 max_id
On 06/25/2013 01:03 AM, Josef Bacik wrote:
On Fri, Jun 21, 2013 at 03:32:28PM +0800, Anand Jain wrote:
btrfs-progs has to read fs info from the kernel to
read the latest info instead of reading it from the disks,
which generally is a stale info after certain critical
operation.
getting
kindly ignore this patch, the feature now is implemented
without adding any _new_ ioctl or _new_ parameters.
Thanks, Anand
On 06/21/2013 03:58 PM, Anand Jain wrote:
btrfs-progs has to read fs info from the kernel to
read the latest info instead of reading it from the disks,
which generally
: this patch also depends on
path 9/13 to 12/13 also sent here.
v1-v2:
code optimized to remove redundancy
Signed-off-by: Anand Jain anand.j...@oracle.com
merg
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 166
Reviewed-by: Anand Jain anand.j...@oracle.com
On 06/26/2013 11:52 PM, Josef Bacik wrote:
This test doesn't need the scratch dev pool and it also doesn't call
_require_scratch_dev_pool, so just kick out the scratch dev pool part of the
test. Thanks,
Signed-off-by: Josef Bacik jba
Per code it appears that btrfs check doesn't use the EXCL
open which means mount can be successful when the check is
running.
Thanks, Anand
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at
On 06/27/2013 09:57 AM, Josef Bacik wrote:
If you use the SCRATCH_DEV_POOL for btrfs you will end up with the command line
like this
mkfs.btrfs $SCRATCH_DEV_POOL $SCRATCH_DEV
and btrfs does this thing where it makes the lowest valued device id show up in
/proc/mounts no matter which device
Looks good. But. Since there is repeated calls to mkfs,
-f option might be mandatory. and 265 is indeed working before.
You need to re-phrase the title to the fixes you are bringing in.
Reviewed-by: Anand Jain anand.j...@oracle.com
On 06/28/2013 01:49 AM, Josef Bacik wrote
good catch.
Reviewed-by: Anand Jain anand.j...@oracle.com
On 06/30/2013 07:51 PM, Filipe David Borba Manana wrote:
The uuid_unparse() call in btrfs_scan_one_device() was
a no-op.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
volumes.c |2 --
1 file changed, 2
further, you need to free device-label as well.
static int device_list_add(const char *path,
struct btrfs_super_block *disk_super,
u64 devid, struct btrfs_fs_devices **fs_devices_ret)
{
::
device-label = kstrdup(disk_super-label,
revamp this patch to the bug here, based feedback(s).
(my new patch-set doesn't have to call device_list_fini()
any more, so this patch is kind of void now).
Thanks, Anand
On 07/03/2013 01:01 PM, Anand Jain wrote:
further, you need to free device-label as well.
static int
btrfs_close_devices() should reset fs_devices-latest_bdev
and fs_devices-lowest_bdev as well they hold fd of the
open dev in the list which is being closed.
On 07/03/2013 09:25 PM, Miao Xie wrote:
Some commands(such as btrfs-convert) access the devices again after we close
the ctree, so
-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c |4 +++
cmds-filesystem.c | 11 -
cmds-replace.c|2 +
cmds-scrub.c |3 ++
disk-io.c |1 +
mkfs.c|1 +
utils.h |1 +
volumes.c | 56
Thanks.
Reviewed-by: Anand Jain anand.j...@oracle.com
On 07/10/2013 07:01 AM, Wang Shilong wrote:
From: Wang Shilong wangsl.f...@cn.fujitsu.com
After calling opendir() successfully, closedir() should be
also called to free memory. Otherwise, memory leak happens.
Signed-off-by: Wang
Thanks.
- btrfs restore [options] device,
+ btrfs restore [options] device path | btrfs restore -l device,
should this be rather...
btrfs restore [options] device path | -l device,
Thanks
Anand
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the
(dirstream);
We have to closedir only when fd 0.
Thanks, Anand
On 10/07/2013 11:43, Anand Jain wrote:
Thanks.
Reviewed-by: Anand Jain anand.j...@oracle.com
On 07/10/2013 07:01 AM, Wang Shilong wrote:
From: Wang Shilong wangsl.f...@cn.fujitsu.com
After calling opendir() successfully
After calling opendir() successfully, closedir() should be
also called to free memory. Otherwise, memory leak happens.
Signed-off-by: Anand Jain anand.j...@oracle.com
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com
Reviewed-by: Anand Jain anand.j...@oracle.com
---
utils.c |6 --
1
, closedir() should be
also called to free memory. Otherwise, memory leak happens.
Signed-off-by: Anand Jain anand.j...@oracle.com
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com
Reviewed-by: Anand Jain anand.j...@oracle.com
---
utils.c |6 --
1 files changed, 4 insertions(+), 2
A complete fix for the memory leak caused by device_list_add()
is more complicated than initial idea and so sorry that I
have to pull back this patch as well.
The main reason-
There are uncoordinated scan for btrfs which would result
in doing the same thing multiple times.
I am sending a patch to fix the the memory leak. So
its fine if this patch just address the close issue.
This is more complicated than initially thought and it
isn't ready. As explained in the other thread.
Thanks, Anand
--
To unsubscribe from this list: send the line unsubscribe
(These changes were needed as part of show --kernel support,
with out introducing new ioctl)
Anand Jain (11):
btrfs-progs: btrfs_scan_for_fsid doesn't need all the arguments
btrfs-progs: label option in btrfs filesystem show is not coded
btrfs-progs: update device scan usage
btrfs-progs
btrfs_scan_for_fsid uses only one argument run_ioctl out of 3
so remove the rest two of them
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-find-root.c |2 +-
disk-io.c |2 +-
utils.c |5 ++---
utils.h |3 +--
4 files changed, 5 insertions
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c |2 +-
man/btrfs.8.in|8
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index 222e458..a1a8830 100644
--- a/cmds-filesystem.c
+++ b/cmds-filesystem.c
the btrfs device scan usage didnt publish --all-devices
option so add it
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cmds-device.c b/cmds-device.c
index 9e7328b..c94fcd5 100644
--- a/cmds-device.c
This would help to reuse the function
v1-v2: removed static and updated .h file, in a preparation
work for the following patch
Signed-off-by: Anand Jain anand.j...@oracle.com
---
utils.c | 18 +-
utils.h |1 +
2 files changed, 14 insertions(+), 5 deletions(-)
diff
tweaking it.
the patch which recommends to use /dev/mapper
will also need it
v3:
bring in btrfs_scan_for_fsid to use scan_for_btrfs
thanks
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c | 11 +++
cmds-filesystem.c |9 +++--
utils.c | 22
Code can be well reused and this is the prepatory work
for the patch following this.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 83 ++--
ctree.h | 11 +++
2 files changed, 59 insertions(+), 35
:
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 | 43 ++-
2 files changed
optimized to remove redundancy
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 162 ++--
1 files changed, 155 insertions(+), 7 deletions(-)
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index 5225db0..148192a 100644
.)
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-device.c |8 +++-
cmds-filesystem.c |7 +--
man/btrfs.8.in| 11 ++-
utils.c |3 +++
utils.h |5 +++--
5 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/cmds-device.c b
This is a prepatory work for the following btrfs fi show command
fixes. So that we have a function get_df to get the fs sizes.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-filesystem.c | 96 +++--
1 files changed, 56 insertions(+), 40
close_all_devices() is declared once in disk-io.c and again
in btrfs-find-root.c I see no reasons or is there any ?
This patch will fix it.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-find-root.c | 17 +
disk-io.c |3 +--
disk-io.h |1 +
3
trivial: cmds-replace.c contains long lines fix it
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-replace.c | 17 ++---
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/cmds-replace.c b/cmds-replace.c
index 6397bb5..c68986a 100644
--- a/cmds-replace.c
+++ b
Anand Jain (2):
btrfs-progs: fix the long lines
btrfs-progs: close_all_devices() declared in multiple files
btrfs-find-root.c | 17 +
cmds-replace.c| 17 ++---
disk-io.c |3 +--
disk-io.h |1 +
4 files changed, 13 insertions(+), 25
close_all_devices() is declared once in disk-io.c and again
in btrfs-find-root.c. The one in latter is completely useless
so delete it.
This patch will fix it.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-find-root.c | 17 +
disk-io.c |3 +--
disk-io.h
.
Thanks Anand
On 07/15/2013 10:06 PM, Eric Sandeen wrote:
On 7/15/13 12:35 AM, Anand Jain wrote:
trivial: cmds-replace.c contains long lines fix it
I realize that this is total bikeshedding, so you can take or leave it, but:
One downside to this is that it makes it a little harder to grep
'btrfs fi label /btrfs' will hang until balance is completed.
(and probably even set label would hang). This is because we
are trying to hold volume_mutex lock which balance will hold
during its tenure.
---
static int btrfs_ioctl_get_fslabel(struct file *file, void __user *arg)
::
hung
This patch will use mutex uuid_mutex. which is defined
in volume.c, and so it is moved to volume.h as well.
also this patch will add a bit of optimization within
the btrfs_ioctl_get_falabel() function.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
fs/btrfs/ioctl.c | 16
Instead the spinlock super_lock looks appropriate for
protecting concurrent access to the label field of fs_info-super_copy.
In btrfs_ioctl_set_fslabel() make sure to only hold the spinlock for the
copy operation, not while calling the transaction functions.
Oh yeah ! fs_info-super_lock is
hung
also this patch will add a bit of optimization within
the btrfs_ioctl_get_falabel() function.
v1-v2:
use fs_info-super_lock instead of uuid_mutex
Signed-off-by: Anand Jain anand.j...@oracle.com
---
fs/btrfs/ioctl.c | 16 ++--
1 file changed, 10 insertions(+), 6 deletions
mounted: /btrfs
Group profile: metadata: single data: single
Total devices 1 FS bytes used 28.00KiB
devid1 size 2.00GiB used 20.00MiB path /dev/sdb
-
Signed-off-by: Anand Jain anand.j...@oracle.com
---
fs/btrfs/volumes.c | 30
Signed-off-by: Anand Jain anand.j...@oracle.com
---
fs/btrfs/disk-io.c |6 --
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index dfe6864..de5884f 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2982,9 +2982,11
The below patch set is on top of,
git://repo.or.cz/btrfs-progs-unstable/devel.git integration-20130710
and is for your kind review coment and integration
Thanks
Anand Jain (6):
btrfs-progs: close_all_devices() in btrfs-find-root.c does nothing
btrfs-progs: let user know that devid can
close_all_devices() is declared once in disk-io.c and again
in btrfs-find-root.c. The one in latter is completely useless
so delete it.
This patch will fix it.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
btrfs-find-root.c | 17 +
disk-io.c |3 +--
disk-io.h
test_dev_for_mkfs() is a common place where
we check if a device is fit for the btrfs use.
cmd_start_replace() should make use of test_dev_for_mkfs(),
and here the test_dev_for_mkfs() is further enhanced
to fit the cmd_start_replace() needs.
Thanks
Signed-off-by: Anand Jain anand.j...@oracle.com
-
Signed-off-by: Anand Jain anand.j...@oracle.com
---
mkfs.c | 104 +--
utils.c | 41 +
utils.h |2 +
3 files changed, 84 insertions(+), 63 deletions(-)
diff --git a/mkfs.c b/mkfs.c
index 66f558a
Signed-off-by: Anand Jain anand.j...@oracle.com
---
mkfs.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/mkfs.c b/mkfs.c
index 60f906c..66f558a 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -1570,6 +1570,8 @@ int main(int ac, char **av)
* occur by the following
/dev/sdc /dev/sde /btrfs
Error: Unable to open device '/dev/sdc'
Try using the devid instead of the path
---
Signed-off-by: Anand Jain anand.j...@oracle.com
---
cmds-replace.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/cmds-replace.c b/cmds-replace.c
index
when we scan /proc/partitions the cdrom is scanned
as well, and we don't have to report ENOMEDIUM errors
against it.
Signed-off-by: Anand Jain anand.j...@oracle.com
---
utils.c |5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/utils.c b/utils.c
index 4aeea9c..638cef0
3.11.0-rc3+
--
[ 225.586356] kernel BUG at fs/btrfs/relocation.c:886!
[ 225.586362] invalid opcode: [#1] SMP
::
[ 225.586431] Call Trace:
[ 225.586440] [a0055cd1] ?
btree_read_extent_buffer_pages.clone.4+0xd1/0x120 [btrfs]
[ 225.586447] [a00a9123]
On 06/08/2013 01:36, David Sterba wrote:
On Mon, Jul 15, 2013 at 01:30:46PM +0800, Anand Jain wrote:
Anand Jain (11):
btrfs-progs: btrfs_scan_for_fsid doesn't need all the arguments
btrfs-progs: label option in btrfs filesystem show is not coded
btrfs-progs: update device scan usage
Further there is benefit of having newer subcommands
in the master branch - it gets visibility.
However if we are trying to solve the problem of it
not being end user ready then there can be a warning
message about it when the user uses it or sees it.
I see some of online shops tagging
test_dev_for_mkfs() is a common place where
we check if a device is fit for the btrfs use.
cmd_start_replace() should make use of test_dev_for_mkfs(),
and here the test_dev_for_mkfs() is further enhanced
to fit the cmd_start_replace() needs.
Thanks
Signed-off-by: Anand Jain anand.j...@oracle.com
-
Signed-off-by: Anand Jain anand.j...@oracle.com
---
mkfs.c | 104 +--
utils.c | 41 +
utils.h |2 +
3 files changed, 84 insertions(+), 63 deletions(-)
diff --git a/mkfs.c b/mkfs.c
index 6325c1f
When the device disappear the path goes missing,
and that will be the one of the reason that user
will replace the device.
The devid of the missing btrfs device can be
obtained using the new cli option
btrfs fi show --kernel (coming soon)
And which can be used in the replace command.
---
Anand Jain (3):
btrfs-progs: let user know that devid can be used if path is missing
btrfs-progs: cmd_start_replace() to use test_dev_for_mkfs()
btrfs-progs: avoid write to the disk before sure to create fs
cmds-replace.c | 33 +++---
mkfs.c | 104
1 - 100 of 3004 matches
Mail list logo