Hi,
more details about this RFC as below..
So a user with old kernel won't be able to create a filesystem with
newer feature forever.
Thats not true. Here below is an example of the problem and fix
in action.
Maybe the user are just making btrfs for his or her newer kernel?
Yes. Tha
alloc instead of malloc.
Signed-off-by: Anand Jain
---
cmds-filesystem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index 3663734..4d3a9a4 100644
--- a/cmds-filesystem.c
+++ b/cmds-filesystem.c
@@ -685,7 +685,7 @@ stati
---
utils.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/utils.c b/utils.c
index f1e3248..b754686 100644
--- a/utils.c
+++ b/utils.c
@@ -763,6 +763,7 @@ int btrfs_add_to_fsid(struct btrfs_trans_handle *trans,
if (!device->name)
goto err_nomem;
+ INIT_LIST_HEA
Thanks Jeff for the comments.
On 10/23/2015 11:24 PM, Jeff Mahoney wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10/21/15 4:45 AM, Anand Jain wrote:
mkfs from latest btrfs-progs will enable latest default features,
and if the kernel is down-rev and does not support a latest
default
Qu,
We shouldn't mark FS readonly when chunks are degradable.
As below.
Thanks, Anand
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 39a2d57..dbb2483 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3530,7 +3530,7 @@ static int write_all_supers(struct btrfs_root
*r
On 10/30/2015 07:41 PM, Qu Wenruo wrote:
在 2015年10月30日 16:32, Anand Jain 写道:
Qu,
We shouldn't mark FS readonly when chunks are degradable.
As below.
Thanks, Anand
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 39a2d57..dbb2483 100644
--- a/fs/btrfs/disk-io.c
+++
This is misleading, these error messages might make one think that the
4th drive is bad and has to be replaced, which would reduce the
redundancy to the minimum because it's the second drive that's actually
bad.
following RFC will solve the misleading part of the problem..
[RFC PATCH] Bt
Hi Zhao,
Hope you could do this/apply on top of patch set
"Introduce device delete by devid"
I vaguely remember that patchset as well did some cleanups
in this part of the code.
Thanks, Anand
On 11/09/2015 05:59 PM, Zhao Lei wrote:
Switch to common warning()/error() for cmds-device.c.
S
7;s not OK to mount it as degraded.
Reported-by: Zhao Lei
Reported-by: Anand Jain
Signed-off-by: Qu Wenruo
[Btrfs: use btrfs_error instead of btrfs_err during mount]
Signed-off-by: Anand Jain
---
fs/btrfs/disk-io.c | 18 ++
1 file changed, 10 insertions(+), 8 deletions(-)
di
When the user or system calls the BTRFS_IOC_SCAN_DEV,
ioctl this patch will make sure it is added to the device
list and set it as spare.
This operation will be same when BTRFS_IOC_DEVICES_READY
as well since BTRFS_IOC_DEVICES_READY ioctl has been doing
that by legacy.
Signed-off-by: Anand Jain
against the failing device and
4) a device in the multi device btrfs may go offline from the system
(but as of now in in some system config btrfs gets unmounted in this
context, which is not a correct behavior)
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 148
Write and Flush errors are considered as critical errors,
upon which the device will be brought offline and marked as
failed. Write and Flush errors are identified using device
error statistics.
Signed-off-by: Anand Jain
---
fs/btrfs/disk-io.c | 43
Signed-off-by: Anand Jain
---
fs/btrfs/disk-io.c | 8 +++-
fs/btrfs/volumes.c | 2 --
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 958c2a6..d3303f9 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3428,6 +3428,7
Spare devices can be scanned but shouldn't be mountable.
Signed-off-by: Anand Jain
---
fs/btrfs/disk-io.c | 8
1 file changed, 8 insertions(+)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 38e0385..3662c0a 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk
replace, in the long run I hope both the codes to be merged.
Signed-off-by: Anand Jain
---
fs/btrfs/dev-replace.c | 116 +
fs/btrfs/dev-replace.h | 1 +
2 files changed, 117 insertions(+)
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
see below stale kmem cache during module unload. Which
I am digging.
--
BUG btrfs_path (Not tainted): Objects remaining in btrfs_path on
kmem_cache_close()
--
Anand Jain (10):
btrfs: optimize btrfs_check_degradable() for calls outside of barrier
btrfs: introduce device dynamic state tran
From: Qu Wenruo
The last user of num_tolerated_disk_barrier_failures is
barrier_all_devices(). But it's can be easily changed to new per-chunk
degradable check framework.
Now btrfs_device will have two extra members, representing send/wait
error, set at write_dev_flush() time. And then check it
From: Qu Wenruo
As we use per-chunk degradable check, now the global
num_tolerated_disk_barrier_failures is of no use. So cleanup it.
Signed-off-by: Qu Wenruo
[Btrfs: resolve conflict to apply 'btrfs: Cleanup
num_tolerated_disk_barrier_failures']
Signed-off-by: Anand Jain
---
This adds functions to get and put a spare device from the list.
So that hot repace code can pick a spare device when needed.
Signed-off-by: Anand Jain
---
fs/btrfs/super.c | 9 +
fs/btrfs/volumes.c | 37 +
fs/btrfs/volumes.h | 2 ++
3 files
Add BTRFS_FEATURE_INCOMPAT_SPARE_DEV (400) flag to identify
a spare device.
Along with this it checks in the mount context that a spare
device will fail to mount. As spare devices aren't mountable.
Signed-off-by: Anand Jain
---
fs/btrfs/ctree.h | 4 +++-
1 file changed, 3 insertions(
es at scan. Which means the original block at
open_ctee() won't reach in case of device with unsupported feature.
But I am leaving that code as it is. without deleting.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/fs/btrfs/v
From: Qu Wenruo
Just the same for mount time check, use new btrfs_check_degraded() to do
per chunk check.
Signed-off-by: Qu Wenruo
Btrfs: use btrfs_error instead of btrfs_err during remount
Signed-off-by: Anand Jain
---
fs/btrfs/super.c | 11 +++
1 file changed, 7 insertions(+), 4
This patch creates casualty_kthread to check for the failed
devices, and triggers device replace.
Signed-off-by: Anand Jain
---
fs/btrfs/ctree.h | 1 +
fs/btrfs/disk-io.c | 67 ++
fs/btrfs/transaction.c | 3 ++-
3 files changed, 70
From: Qu Wenruo
Introduce a new function, btrfs_check_degradable(), to judge if all chunks
in btrfs is OK for degraded mount.
It provides the new basis for accurate btrfs mount/remount and even
runtime degraded mount check other than old one-size-fit-all method.
Signed-off-by: Qu Wenruo
---
f
Signed-off-by: Anand Jain
---
btrfs-show-super.c | 3 ++-
ctree.h| 4 +++-
volumes.c | 4
volumes.h | 2 ++
4 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/btrfs-show-super.c b/btrfs-show-super.c
index 27414c8..d9626cd 100644
--- a/btrfs-show
Signed-off-by: Anand Jain
---
Android.mk | 2 +-
Makefile.in | 2 +-
btrfs.c | 1 +
cmds-spare.c | 291 +++
commands.h | 2 +
5 files changed, 296 insertions(+), 2 deletions(-)
create mode 100644 cmds-spare.c
diff --git
Depends on the kernel patch set
[PATCH 00/15] btrfs: Hot spare and Auto replace
This is btrfs-progs side of the patch set.
Anand Jain (4):
btrfs-progs: Introduce BTRFS_FEATURE_INCOMPAT_SPARE_DEV SB flags
btrfs-progs: Introduce btrfs spare subcommand
btrfs-progs: add fi show for spare
Signed-off-by: Anand Jain
---
cmds-filesystem.c | 4
1 file changed, 4 insertions(+)
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index 4d3a9a4..11d0406 100644
--- a/cmds-filesystem.c
+++ b/cmds-filesystem.c
@@ -353,6 +353,9 @@ static void print_one_uuid(struct btrfs_fs_devices
2 size 2.00GiB used 417.50MiB path /dev/sdd
Global spare
device size 3.00GiB path /dev/sde
btrfs-progs v4.2.3-12-gb5f4b68
Signed-off-by: Anand Jain
---
cmds-filesystem.c | 5 +
utils.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/cmds-filesystem.c b/cmds
Thanks for the comments.
Sorry for the delay.
Trying to find out if there is any pending concerns...
Hopefully, per-filesystem hot-spares will be a high priority too, as
that type of usage is pretty much required for many enterprise type
uses, although that doesn't need to be the same code
Thanks for the comments.
Let's take the following example:
1) 2 RAID1 + 1 spare
(A + B) + C
2) 3 RAID1
(A + B + C)
At least in normal operation case, case 1) makes device C useless, and
Yes.
For case 2), we can just relocate and recover the bad chunks in B.
It it should only
Thanks for comments.
On 11/13/2015 03:21 AM, Goffredo Baroncelli wrote:
On 2015-11-09 11:56, Anand Jain wrote:
These set of patches provides btrfs hot spare and auto replace support
for you review and comments.
Hi Anand,
is there any reason to put this kind of logic in the kernel space ?
I
Thanks for commenting.
I'm sorry but I didn't quite see the benefit of a spare device.
Aside from what Duncan said (and I happen to agree with him), there is
also the fact that hot-spares are (at least traditionally in most RAID
systems) usually used with RAID5 or RAID6 (or some other parity
On 11/16/2015 09:41 PM, Austin S Hemmelgarn wrote:
On 2015-11-09 05:56, Anand Jain wrote:
These set of patches provides btrfs hot spare and auto replace support
for you review and comments.
First, here below are the simple example steps to configure the same:
Add a spare device:
btrfs
Thanks David.
Checked other places it seems to be fine.
My oversight on the rcu usage part. Thanks.
Reviewed-by: Anand Jain
On 11/19/2015 06:35 PM, David Sterba wrote:
The test btrfs/011 triggers a rcu warning
===
[ INFO: suspicious RCU usage. ]
4.4.0-rc1
btrfs-convert convert FS with latest default features enabled, and
if the kernel is down-rev and does not support a latest feature then
mount fails, as expected.
This patch disables default features based on the running kernel.
Signed-off-by: Anand Jain
---
v2: Check if sysfs tells what
Mkfs from latest btrfs-progs will enable latest default features,
and if the kernel is down-rev and does not support a latest default
feature then mount fails, as expected.
This patch disables default features based on the running kernel.
Signed-off-by: Anand Jain
---
v2: Check if sysfs tells
Signed-off-by: Anand Jain
---
btrfs-convert.c | 10 +-
mkfs.c | 8 +++-
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/btrfs-convert.c b/btrfs-convert.c
index 52ea12a..b0a998b 100644
--- a/btrfs-convert.c
+++ b/btrfs-convert.c
@@ -2898,14 +2898,22 @@ int
will be the minimum kernel version needed to use the feature.
Further, for features supported later than 3.14 this list can still be
updated, so it serves as a repository which can be displayed for easy
reference.
Signed-off-by: Anand Jain
---
v2: Check for condition that what happens when we fail
This adds a framework to check the /sys/fs/btrfs/features for the list
of supported features by the btrfs kernel. Which I hope by using it the
mkfs and btrfs-convert could tune to set features as supported by the
running kernel.
Signed-off-by: Anand Jain
---
utils.c | 66
I hope all the concerns from the review comments are
addressed.
Anand Jain (5):
btrfs-progs: introduce framework to check kernel supported features
btrfs-progs: add framework to check features supported by sysfs
btrfs-progs: kernel based default features for mkfs
btrfs-progs: kernel based
s -O as-per-kernel=3.2
mkfs.btrfs -O as-per-kernel=4.0
mkfs.btrfs -O as-per-kernel=x.x (anything)
And only those features that are supported until version x.x
(mainline) will be enabled by default unless user want to over
default totally by using -O .
Thanks, Anand
Anand Jain wrote:
Btrfs-progs
David Sterba wrote:
On Mon, Nov 23, 2015 at 08:56:13PM +0800, Anand Jain wrote:
Btrfs-progs is a tool for the btrfs kernel and we hope latest btrfs-progs
be compatible w any set of older/newer kernels.
So far mkfs.btrfs and btrfs-convert sets the default features, for eg,
skinny-metadata
will be the minimum kernel version needed to use the feature.
Further, for features supported later than 3.14 this list can still be
updated, so it serves as a repository which can be displayed for easy
reference.
Signed-off-by: Anand Jain
---
v3: Mike pointed out that mixed-bg was from version
As discussed in the mailing list this provides a framework to introduce
the feature where mkfs and btrfs-convert can set the default features
as per the given mainline kernel version.
Suggested-by: David Sterba
Signed-off-by: Anand Jain
---
utils.c | 23 +++
utils.h | 1
extended format (0x80, 3.9)
skinny-metadata - reduced-size metadata extent refs (0x100, 3.10, default)
no-holes- no explicit hole extents for files (0x200, 3.14)
Signed-off-by: Anand Jain
---
utils.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/utils.c b/utils.c
This provides default feature set by version, for mkfs.btrfs
through the new option '-O comp=|', where x.y.z is the
minimum kernel version that should be supported.
Signed-off-by: Anand Jain
---
mkfs.c | 24 ++--
1 file changed, 22 insertions(+), 2 deletions(-)
di
vides the -O comp= for mkfs.btrfs and
btrfs-convert respectively
Thanks, Anand
Anand Jain (7):
btrfs-progs: show the version for -O list-all
btrfs-progs: add kernel alias for each of the features in the list
btrfs-progs: make is_numerical non static
btrfs-progs: check for numeric
We should have maintained feature's name same across progs UI and sysfs UI.
For example, progs mixed-bg is /sys/fs/btrfs/features/mixed_groups
in sysfs. As these are already released and is UIs, there is nothing much
can be done about it, except for creating the alias and making it aware.
Add kern
User may want to convert the FS to a minimum kernel version. As they may need
to use btrfs on a set of known kernel versions. And have the disk layout
compatible.
Signed-off-by: Anand Jain
---
btrfs-convert.c | 21 +
1 file changed, 21 insertions(+)
diff --git a/btrfs
As the version is now being passed by user it should be checked
if its numerical. We didn't need this before as version wasn't
passed by used. So this is not a bug fix.
Signed-off-by: Anand Jain
---
utils.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a
Signed-off-by: Anand Jain
---
cmds-replace.c | 11 ---
utils.c| 11 +++
utils.h| 1 +
3 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/cmds-replace.c b/cmds-replace.c
index 9ab8438..86162b6 100644
--- a/cmds-replace.c
+++ b/cmds-replace.c
- no explicit hole extents for files (0x200,
3.14)
Signed-off-by: Anand Jain
---
V1.1 add signed-off-by
utils.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/utils.c b/utils.c
index 0163915..6d2675d 100644
--- a/utils.c
+++ b/utils.c
@@ -648,17 +648,26 @@
Liu Bo wrote:
On Wed, Nov 25, 2015 at 08:08:15PM +0800, Anand Jain wrote:
We should have maintained feature's name same across progs UI and sysfs UI.
For example, progs mixed-bg is /sys/fs/btrfs/features/mixed_groups
in sysfs. As these are already released and is UIs, there is nothing
On 11/26/2015 10:02 AM, Qu Wenruo wrote:
Anand Jain wrote on 2015/11/25 20:08 +0800:
Sometimes users may want to have a btrfs to be supported on multiple
kernel version. A simple example, USB drive can be used with multiple
system running different kernel versions. Or in a data center a SAN
ls handle such
kernel mismatch, or do they?
Thanks,
Qu
First of all to let user know what features was supported at what
kernel
version. Patch 1/7 updates -O list-all which will list the feature with
version.
As we didn't maintain the sysfs and progs feature names consistent, so
to avoid conf
Hope we are in sync on..
1.
The term auto that you are using here refs to
'Progs default-features being updated at the _run time_'.
2.
In the long run, mostly it would be:
progs-version > LTS-kernel-version
(for the reason that user would need fsck,tools.. etc)
With the new -O comp= optio
I meant, it can be done in packaging level and it's much easier to do.
Its all about trade off, and there is no right or wrong, so is tough
to arrive at a conclusion even before this was implemented. Below are
the choices considered, now putting in the order of least suitable
to most su
On 11/27/2015 01:30 PM, Duncan wrote:
Ian Kelling posted on Thu, 26 Nov 2015 21:14:57 -0800 as excerpted:
I'd like to run "mail" when a btrfs raid drive fails, but I don't know
how to detect that a drive has failed. It don't see it in any docs.
Otherwise I assume I would never know until enou
(Most of the technical reasoning were already discussed so I won't
repeat them here).
And jolting for new technical reasons finds only these..
What if the fs is not only for kernel to mount, but also a boot
partition for grub?
Do you need to check the grub2 version? Check if this is a /boo
(this is a different topic, updated the subject)
Totally agree with this point. Too many non-sense in btrfs-progs codes
copied from kernel, and due to lack of update, it's very buggy now.
Just check volume.c for allocating data chunk.
Which functions in volume.c in particular ?
Thanks, An
Data center systems are generally aligned with the RAS (Reliability,
Availability and Serviceability) attributes. When it comes to Storage,
RAS applies even more because its matter of trust. In this context, one
of the primary area that a typical volume manager should be well teste
(fixed alignment)
Data center systems are generally aligned with the RAS (Reliability,
Availability and Serviceability) attributes. When it comes to Storage,
RAS applies even more because its matter of trust. In this context, one
of the primary area that a typical volume manager sh
On 11/28/2015 01:19 AM, Christoph Anton Mitterer wrote:
On Fri, 2015-11-27 at 17:16 +0800, Anand Jain wrote:
I understand as a user, a full md/lvm set of features are important
to begin operations using btrfs and we don't have it yet. I have to
blame it on the priority list.
W
David,
the possibility of unloaded module that would remove the access to
sysfs, as you point out.
Kindly note, the patch below made /dev/btrfs-control a static node,
-
commit 578454ff7eab61d13a26b568f99a89a2c9edc881
Author: Kay Sievers
Date: Thu May 20 18:07:20 2010 +0200
driver cor
BTW, any good idea for btrfs to do such operation like
enabling/disabling some minor features? Especially when it can be set on
individual file/dirs.
Features like incoming write time deduplication, is designed to be
enabled/disabled for individual file/dirs, so it's not a quite good idea
to u
There isn't any real use of following members of struct btrfs_root
so delete them.
struct kobject root_kobj;
struct completion kobj_unregister;
struct mutex objectid_mutex;
Signed-off-by: Anand Jain
---
fs/btrfs/ctree.h | 4
fs/btrfs/disk-io.c | 3 ---
fs/btrfs/inode-map.c | 2
Anand Jain wrote:
There isn't any real use of following members of struct btrfs_root
so delete them.
struct kobject root_kobj;
struct completion kobj_unregister;
struct mutex objectid_mutex;
Signed-off-by: Anand Jain
---
fs/btrfs/ctree.h | 4
fs/btrfs/disk-io.c | 3 ---
fs/b
There isn't any real use of following members of struct btrfs_root
so delete them.
struct kobject root_kobj;
struct completion kobj_unregister;
Signed-off-by: Anand Jain
---
v2: accepts Filipe comment and commit update
fs/btrfs/ctree.h | 2 --
fs/btrfs/disk-io.c | 2 --
2 files chang
even the life
cycle of them. Changes are internal only. And to ensure the same,
this path has been tested with various device operations and,
checking and comparing the sysfs kobjects and attributes with
sysfs kobject and attributes with out this patch, and they remain
same.
Signed-off-by: Anand
Dave,
On 01/21/2015 12:26 PM, Dave Chinner wrote:
On Fri, Jan 02, 2015 at 09:04:29PM +0800, Anand Jain wrote:
The subvol delete output has changed with btrfs-progs
-Delete subvolume 'SCRATCH_MNT/snap'
+Delete subvolume (no-commit): 'SCRATCH_MNT/snap'
so fix 001
The following test case hangs as of now, but as I remember Fujitsu
had sent a patch to fix this, a long time back. Can't find now,
any idea. ?
Test case:
add a spout device
replace seed / sprout device
hangs at:
(btrfs_reada_wait+0x4d/0xb0)
Thanks, Anand
--
To unsubscribe from thi
Recently i found that, the original code with out this patch has a bug during
kobject clean up, which is prominent with this patch, i am digging more. Just
an early headsup. Thxs. Anand.
Sent from my Sony Xperia™ smartphone
Anand Jain wrote
>This patch will provide a framework
I think we won't need this patch. the coming sysfs changes will
have entry point to handle missing devices/FSID. (inspired by md).
That will be much cleaner to trigger the clean up based on the
device FS changes.
The proposed fix in this Patch, can it handle things like when
customer decides to
ne(fs_info);
+ ret = btrfs_sysfs_add_one(fs_info);
+ if (ret) {
+ pr_err("BTRFS: failed to init sysfs interface: %d\n", ret);
+ goto fail_block_groups;
+ }
cleaning up the unregistered kobject fixes this.
Signed-off-by: Anand Jain
---
fs/btrfs/sy
This patch needs
[PATCH 1/1] Btrfs: btrfs_release_super_kobj() should clean up the
kobject data
further, I am planning to clean up and split below patch to show
the enhancements and fix-ups separately. Will send V2 soon. Thanks.
Anand
On 01/20/2015 12:02 AM, Anand Jain wrote:
This
ret = btrfs_sysfs_add_one(fs_info);
+ if (ret) {
+ pr_err("BTRFS: failed to init sysfs interface: %d\n", ret);
+ goto fail_block_groups;
+ }
Signed-off-by: Anand Jain
---
fs/btrfs/sysfs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/btrfs/sysfs.c b/fs/
err("BTRFS: failed to init sysfs interface: %d\n", ret);
+ goto fail_block_groups;
+ }
cleaning up the unregistered kobject fixes this.
Signed-off-by: Anand Jain
---
fs/btrfs/sysfs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/s
sysfs kobjects and attributes with
sysfs kobject and attributes with out this patch, and they remain
same. These test cases are added to the progs as test-btrfs-devmgt.sh,
its patch is below as well.
Anand Jain (12):
Btrfs: sysfs: fix, btrfs_release_super_kobj() should to clean up the
kobject
kobject_unregister is to handle the release of the kobject,
its completion init is being called in btrfs_sysfs_add_one(),
so we don't have to do the same in the open_ctree() again.
Signed-off-by: Anand Jain
---
fs/btrfs/disk-io.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/btrfs
Signed-off-by: Anand Jain
---
fs/btrfs/sysfs.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index c3e7f06..c923e8b 100644
--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
@@ -508,7 +508,7 @@ static int addrm_unknown_feature_attrs
even the life
cycle of them. Changes are internal only. And to ensure the same,
this path has been tested with various device operations and,
checking and comparing the sysfs kobjects and attributes with
sysfs kobject and attributes with out this patch, and they remain
same.
Signed-off-by: Anand
Theoritically need to remove the device links attributes, but since its entire
device
kobject was removed, so there wasn't any issue of about it. Just do it nicely.
Signed-off-by: Anand Jain
---
fs/btrfs/sysfs.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/fs/
As of now btrfs_attrs are provided using the default_attrs through
the kset. Separate them and create the default_attrs using the
sysfs_create_files instead. By doing this we will have the
flexibility that device discovery thread could create fsid
kobject.
Signed-off-by: Anand Jain
---
fs/btrfs
Separate device kobject and its attribute creation so that device
kobject can be created from the device discovery thread.
Signed-off-by: Anand Jain
---
fs/btrfs/sysfs.c | 21 +++--
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs
Since the failure code in the btrfs_sysfs_add_one() can
call btrfs_sysfs_remove_one() even before device_dir_kobj
has been created we need to check if its null.
Signed-off-by: Anand Jain
---
fs/btrfs/sysfs.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs
.
fsid
devices
features
unknown features (dynamic features)
And hence the btrfs_sysfs_remove_one() will follow the same
in reverse order. and the device kobject destroy now can
be moved into the function __btrfs_sysfs_remove_one()
Signed-off-by: Anand Jain
---
fs/btrfs/sysfs.c | 23
We need it in a seperate function so that it can be called from the
device discovery thread as well.
Signed-off-by: Anand Jain
---
fs/btrfs/sysfs.c | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index c923e8b..f42d8fd
adds fs_info pointer with struct btrfs_fs_devices.
Signed-off-by: Anand Jain
---
fs/btrfs/sysfs.c | 4
fs/btrfs/volumes.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index ac15fbb..4b5bac6 100644
--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
Signed-off-by: Anand Jain
---
tests/test-btrfs-devmgt.sh | 863 +
1 file changed, 863 insertions(+)
create mode 100755 tests/test-btrfs-devmgt.sh
diff --git a/tests/test-btrfs-devmgt.sh b/tests/test-btrfs-devmgt.sh
new file mode 100755
index 000
Signed-off-by: Anand Jain
---
tests/test-btrfs-devmgt.sh | 76 +-
1 file changed, 75 insertions(+), 1 deletion(-)
diff --git a/tests/test-btrfs-devmgt.sh b/tests/test-btrfs-devmgt.sh
index 2f75200..5facbdb 100755
--- a/tests/test-btrfs-devmgt.sh
+++ b
After I burnt my fingers by testing on non test disks,
decided to have a safe defaults
Signed-off-by: Anand Jain
---
tests/test-btrfs-devmgt.sh | 36 +++-
1 file changed, 15 insertions(+), 21 deletions(-)
diff --git a/tests/test-btrfs-devmgt.sh b/tests/test
Signed-off-by: Anand Jain
---
tests/test-btrfs-devmgt.sh | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/test-btrfs-devmgt.sh b/tests/test-btrfs-devmgt.sh
index 5facbdb..55bc877 100755
--- a/tests/test-btrfs-devmgt.sh
+++ b/tests/test-btrfs-devmgt.sh
@@ -96,6
simple controllable test script to exercise btrfs devices and at the same time
collect sysfs (optional) to test for regression.
v1->v2: add some clean ups
Anand Jain (4):
Btrfs-progs: add regression tests for sysfs contents during btrfs
device management
Btrfs-progs: adds simple to
Signed-off-by: Anand Jain
---
tests/test-btrfs-devmgt.sh | 863 +
1 file changed, 863 insertions(+)
create mode 100755 tests/test-btrfs-devmgt.sh
diff --git a/tests/test-btrfs-devmgt.sh b/tests/test-btrfs-devmgt.sh
new file mode 100755
index 000
drivers/cpufreq/cpufreq.c is already using this function. And now btrfs
needs it as well. export symbol kobject_move().
---
lib/kobject.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/kobject.c b/lib/kobject.c
index 58751bb..e055c06 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -548,
and the related frame work changes
. the patches 1 to 12 has no changes from the previous submit
Anand Jain (24):
Btrfs: sysfs: fix, btrfs_release_super_kobj() should to clean up the
kobject data
Btrfs: sysfs: fix, fs_info kobject_unregister has init_completion()
twice
Btrfs: sysfs:
From: Anand Jain
The following test case fails indicating that, thread tried to init an
initialized object.
kernel: [232104.016513] kobject (880006c1c980): tried to init an
initialized object, something is seriously wrong.
btrfs_sysfs_remove_one() self test code:
open_tree
From: Anand Jain
The sysfs clean up self test like in the below code fails, since
fs_info->device_dir_kobject still points to its stale kobject.
Reseting this pointer will help to fix this.
open_ctree()
{
ret = btrfs_sysfs_add_one(fs_info);
::
+ btrfs_sysfs_remove_one(fs_i
From: Anand Jain
We need it in a seperate function so that it can be called from the
device discovery thread as well.
Signed-off-by: Anand Jain
---
fs/btrfs/sysfs.c | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index
801 - 900 of 1556 matches
Mail list logo