btrfs_extent_readonly() is used by can_nocow_extent() in inode.c. So move
btrfs_extent_readonly() from extent-tree.c to inode.c and declare it as
static.
Signed-off-by: Anand Jain
---
fs/btrfs/ctree.h | 1 -
fs/btrfs/extent-tree.c | 13 -
fs/btrfs/inode.c | 13
Drop function declarations at the beginning of the file scrub.c. These
functions are defined before they are used in the same file.
No functional changes.
Signed-off-by: Anand Jain
---
fs/btrfs/scrub.c | 8
1 file changed, 8 deletions(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs
Move the static function scrub_checksum_tree_block() before its use in
the scrub.c, and drop its declaration.
No functional changes.
Signed-off-by: Anand Jain
---
fs/btrfs/scrub.c | 133 +++
1 file changed, 66 insertions(+), 67 deletions(-)
diff
Move scrub_checksum_data() before its use, and drop its declaration.
No functional changes.
Signed-off-by: Anand Jain
---
fs/btrfs/scrub.c | 61
1 file changed, 30 insertions(+), 31 deletions(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
the result is in the $seqresfull-file.
I find tests/btrfs as the placeholder for this test case. As it
contains many things which are btrfs specific and didn't fit well
under perf.
Feedback/suggestions welcome.
Signed-off-by: Anand Jain
---
tests/btrfs/231
added on top of this
when we have a consensus.
Signed-off-by: Anand Jain
---
This + sequential chunk layout hint (experimental) (patch not yet sent)
helped me get consistent performance numbers for read_policy pid.
As chunk layout hint is not set at mkfs, a balance after setting the
desired chunk l
On 19/02/2021 03:11, Goffredo Baroncelli wrote:
On 2/18/21 6:20 PM, Anand Jain wrote:
btrfs_chunk_alloc() uses dev_alloc_list to allocate new chunks. The
function's stack leading to btrfs_cmp_device_info() sorts the
dev_alloc_list in the descending order of unallocated space. This
sorting
study of the read policy performance.
I find tests/btrfs as the placeholder for this test case. As it
contains many things which are btrfs specific and didn't fit well
under perf.
Signed-off-by: Anand Jain
---
tests/btrfs/231 | 145
tests/
On 24/02/2021 01:35, Johannes Thumshirn wrote:
On 23/02/2021 18:20, Steven Davies wrote:
On 2021-02-23 14:30, David Sterba wrote:
On Tue, Feb 23, 2021 at 09:43:04AM +, Johannes Thumshirn wrote:
On 23/02/2021 10:13, Johannes Thumshirn wrote:
On 22/02/2021 21:07, Steven Davies wrote:
[+
On 23/02/2021 21:53, David Sterba wrote:
On Mon, Feb 22, 2021 at 10:19:06PM +0100, Goffredo Baroncelli wrote:
From: Goffredo Baroncelli
This ioctl is a base for returning / setting information from / to the
fields of the btrfs_dev_item object.
Please don't add a new ioctl for properties, th
On 25/02/2021 05:39, Eric Sandeen wrote:
On 2/24/21 10:12 AM, Eric Sandeen wrote:
Last week I was curious to just see how btrfs is faring with RAID5 in
xfstests, so I set it up for a quick run with devices configured as:
Whoops this was supposed to cc: fstests, not fsdevel, sorry.
-Eric
TES
On 12/02/2021 22:36, David Sterba wrote:
On Wed, Feb 10, 2021 at 09:25:18PM -0800, Anand Jain wrote:
Move the static function scrub_checksum_tree_block() before its use in
the scrub.c, and drop its declaration.
No functional changes.
We've rejected patches that move static function w
On 25/02/2021 11:18, Qu Wenruo wrote:
On 2021/2/25 上午11:15, Eric Sandeen wrote:
On 2/24/21 9:13 PM, Qu Wenruo wrote:
Now this makes way more sense,
Sorry for the earlier mistake.
as your previous comment on
_btrfs_forget_or_module_reload is completely correct.
_btrfs_forget_or_module
On 25/02/2021 12:39, Su Yue wrote:
While playing with seed device(misc/next and v5.11), lockdep complains
the following:
To reproduce:
dev1=/dev/sdb1
dev2=/dev/sdb2
umount /mnt
mkfs.btrfs -f $dev1
btrfstune -S 1 $dev1
mount $dev1 /mnt
btrfs device add $dev2 /mnt/ -f
umount /mnt
m
-by: Eric Sandeen
Signed-off-by: Qu Wenruo
Reviewed-by: Anand Jain
Thanks.
---
common/btrfs| 8
tests/btrfs/124 | 2 ++
tests/btrfs/125 | 2 ++
tests/btrfs/163 | 2 ++
tests/btrfs/164 | 2 ++
tests/btrfs/219 | 2 ++
tests/btrfs/225 | 3 +++
7 files changed, 21 insertions
On 26/02/2021 23:10, David Sterba wrote:
On Fri, Feb 26, 2021 at 01:01:02PM +0800, Anand Jain wrote:
On 25/02/2021 12:39, Su Yue wrote:
While playing with seed device(misc/next and v5.11), lockdep complains
the following:
To reproduce:
dev1=/dev/sdb1
dev2=/dev/sdb2
umount /mnt
mkfs.btrfs
ice_list_mutex in clone_fs_devices().
And adds a lockdep_assert_held(&uuid_mutex) in clone_fs_devices().
Reported-by: Su Yue
Signed-off-by: Anand Jain
---
v2: Remove Martin's Reported-by and Tested-by.
Add Su's Reported-by.
Add lockdep_assert_held check.
Update the change
But if you are planning to
record and start at transaction [14] then its an overkill because
transaction [19 and [20] are already in the disk.
Yes, I'm doing it overkilled.
Ah. Ok.
But it's already much better than scrub all block groups (my original plan).
That's true. Whic
On 07/13/2018 01:39 PM, Qu Wenruo wrote:
On 2018年07月13日 13:32, Anand Jain wrote:
But if you are planning to
record and start at transaction [14] then its an overkill because
transaction [19 and [20] are already in the disk.
Yes, I'm doing it overkilled.
Ah. Ok.
On 07/12/2018 03:13 PM, Nikolay Borisov wrote:
On 10.07.2018 21:22, Anand Jain wrote:
In preparation to de-duplicate a section of code where we deduce the
num_devices, use warn instead of bug.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 2 +-
1 file changed, 1 insertion(+), 1
On 07/12/2018 03:31 PM, Nikolay Borisov wrote:
On 10.07.2018 21:22, Anand Jain wrote:
When the replace is running the fs_devices::num_devices also includes
the replace device, however in some operations like device delete and
balance it needs the actual num_devices without the repalce
On 07/12/2018 03:43 PM, Nikolay Borisov wrote:
On 10.07.2018 21:22, Anand Jain wrote:
Move the section of the code which performs the check if the device is
indelible, move that into a helper function.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 49
On 07/13/2018 07:28 PM, Nikolay Borisov wrote:
On 13.07.2018 14:27, Anand Jain wrote:
On 07/12/2018 03:43 PM, Nikolay Borisov wrote:
On 10.07.2018 21:22, Anand Jain wrote:
Move the section of the code which performs the check if the device is
indelible, move that into a helper
On 07/13/2018 07:17 PM, Nikolay Borisov wrote:
On 13.07.2018 14:17, Anand Jain wrote:
On 07/12/2018 03:31 PM, Nikolay Borisov wrote:
On 10.07.2018 21:22, Anand Jain wrote:
When the replace is running the fs_devices::num_devices also includes
the replace device, however in some
.
btrfs_mount_root
-> btrfs_parse_early_options
->btrfs_scan_one_device
So, there is no necessary to pass fs_devices from btrfs_mount_root,
use a local variable in btrfs_parse_early_options is enough.
Signed-off-by: Gu Jinxiang
Reviewed-by: Anand Jain
---
Changel
-by: Anand Jain
---
fs/btrfs/super.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 9d340f8d3457..9dc56d3eaa66 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -465,9 +465,9 @@ int btrfs_parse_options(struct
On 05/29/2018 07:19 PM, David Sterba wrote:
On Tue, May 29, 2018 at 01:40:34PM +0800, Anand Jain wrote:
v3->v4: As we traverse through the seed device, fs_device gets
updated with
the child seed fs_devices, so make sure we use the same fs_devices
pointer for the mutex_unlock
ice remains scanned after the
sprouting. So use the btrfs_scan_one_device() code instead. And do it
at the end of the sprouting.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 21 -
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/bt
Signed-off-by: Anand Jain
Reviewed-by: David Sterba
---
v3->v4: As we traverse through the seed device, fs_device gets updated with
the child seed fs_devices, so make sure we use the same fs_devices
pointer for the mutex_unlock as used for the mutex_lock.
v2->v3: U
From: Anand Jain
%fs_devices can be free-ed by btrfs_free_stale_devices() when the
close_fs_devices() drops fs_devices::opened to zero, but close_fs_devices
tries to access the %fs_devices again without the device_list_mutex.
Fix this by bringing the %fs_devices access with in the
anges of the individual patches in its change list.
And most of it still remains at v1.
This can also be pulled from:
g...@github.com:asj/btrfs-devel.git misc-next-for-kdave-16jul
Anand Jain (7):
btrfs: drop uuid_mutex in btrfs_free_extra_devids()
btrfs: fix race between free_stale_device
We have assigned the %fs_info->fs_devices in %fs_devices as its not
modified just use it for the mutex_lock().
Signed-off-by: Anand Jain
---
I don't see this in the ML at all, I remember sending this. Anyway
I am marking this as V1.
fs/btrfs/volumes.c | 4 ++--
1 file changed, 2 in
In preparation to de-duplicate a section of code where we deduce the
num_devices, use warn instead of bug.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 7f4973fc2b52
When the replace is running the fs_devices::num_devices also includes
the replace device, however in some operations like device delete and
balance it needs the actual num_devices without the repalce devices, so
now the function btrfs_num_devices() just provides that.
Signed-off-by: Anand Jain
Move the section of the code which performs the check if the device is
indelible, move that into a helper function.
Signed-off-by: Anand Jain
---
v1->v2: Rename function to btrfs_get_device_for_delete(), thanks
Nikolay.
fs/btrfs/volumes.c |
On 07/16/2018 10:18 PM, Anand Jain wrote:
Rename btrfs_parse_early_options() to btrfs_parse_device_options(). As
btrfs_parse_early_options() parses the -o device options and scan the
device provided. So this rename specifies its action. Also the function
name is inline with
On 07/16/2018 10:58 PM, Anand Jain wrote:
As the last set if the pull wasn't integrated due to its pending
review corrections. Here, I have done them (not much except for adding
comments and function renames) and so sending it again. Also
this set clubs other independent patches which a
::
@@ -1561,12 +1564,15 @@ static struct dentry *btrfs_mount_root(struct
file_system_type *fs_type,
goto error_fs_info;
}
- error = btrfs_scan_one_device(device_name, mode, fs_type, &fs_devices);
- if (error) {
+ device = btrfs_scan_one_device(device
This patch adds cli
btrfs device forget [dev]
to remove the given device structure in the kernel if the device
is unmounted. If no argument is given it shall remove all stale
(device which are not mounted) from the kernel.
Signed-off-by: Anand Jain
---
cmds-device.c | 58
ice path is provided.
Again, the devices are removed only if the relevant fsid aren't mounted.
Signed-off-by: Anand Jain
---
fs/btrfs/super.c | 3 +++
fs/btrfs/volumes.c | 9 +
fs/btrfs/volumes.h | 1 +
include/uapi/linux/btrfs.h | 2 ++
4 files changed, 15 in
li and ioctl to forget a scanned device or forget all stale
devices in the kernel.
Anand Jain (1):
btrfs: introduce feature to forget a btrfs device
fs/btrfs/super.c | 3 +++
fs/btrfs/volumes.c | 9 +
fs/btrfs/volumes.h | 1 +
include/uapi/linux/btrfs.h
Please ignore this. There is a line of code which is un-commit.
I am sending this series again. Sorry for the noise.
Thanks, Anand
On 07/18/2018 11:07 AM, Anand Jain wrote:
v7:
Availalbe for pull from
btrfs-progs:
g...@github.com:asj/btrfs-progs.git forget
btrfs.ko:
g
add function to device list delete
Adds cli and ioctl to forget a scanned device or forget all stale
devices in the kernel.
Anand Jain (1):
btrfs: introduce feature to forget a btrfs device
fs/btrfs/super.c | 3 +++
fs/btrfs/volumes.c | 9 +
fs/btrfs/volumes.h
ice path is provided.
Again, the devices are removed only if the relevant fsid aren't mounted.
Signed-off-by: Anand Jain
---
fs/btrfs/super.c | 3 +++
fs/btrfs/volumes.c | 9 +
fs/btrfs/volumes.h | 1 +
include/uapi/linux/btrfs.h | 2 ++
4 files changed, 15 in
This patch adds cli
btrfs device forget [dev]
to remove the given device structure in the kernel if the device
is unmounted. If no argument is given it shall remove all stale
(device which are not mounted) from the kernel.
Signed-off-by: Anand Jain
---
cmds-device.c | 58
le cleanup patches.
Anand Jain (7):
1. btrfs: drop uuid_mutex in btrfs_free_extra_devids()
2. btrfs: fix race between free_stale_devices and close_fs_devices
3. btrfs: do device clone using the btrfs_scan_one_device
4. btrfs: use the assigned fs_devices instead of the dereference
5. btrfs: warn for n
On 07/19/2018 07:45 PM, David Sterba wrote:
On Mon, Jul 16, 2018 at 10:58:12PM +0800, Anand Jain wrote:
Move the section of the code which performs the check if the device is
indelible, move that into a helper function.
Signed-off-by: Anand Jain
---
v1->v2: Rename function
On 07/19/2018 07:53 PM, David Sterba wrote:
On Mon, Jul 16, 2018 at 10:58:11PM +0800, Anand Jain wrote:
When the replace is running the fs_devices::num_devices also includes
the replace device, however in some operations like device delete and
balance it needs the actual num_devices without
On 07/19/2018 08:31 PM, David Sterba wrote:
On Mon, Jul 16, 2018 at 10:58:08PM +0800, Anand Jain wrote:
When we add a device to the RO mounted seed device, it becomes a
RW sprout FS. The following steps are used to hold the seed and
sprout fs_devices.
(first two steps are not mandatory for
Noted. Thanks Dan.
-Anand
On 07/19/2018 04:10 PM, Dan Carpenter wrote:
Hello Anand Jain,
The patch a6500c9ef8ac: "btrfs: add helper function check device
delete able" from Jul 10, 2018, leads to the following static checker
warning:
fs/btrfs/volumes.c:1871 btrfs_device_d
On 07/20/2018 02:35 PM, Anand Jain wrote:
On 07/19/2018 08:31 PM, David Sterba wrote:
On Mon, Jul 16, 2018 at 10:58:08PM +0800, Anand Jain wrote:
When we add a device to the RO mounted seed device, it becomes a
RW sprout FS. The following steps are used to hold the seed and
sprout
On 07/19/2018 07:53 PM, David Sterba wrote:
On Mon, Jul 16, 2018 at 10:58:11PM +0800, Anand Jain wrote:
When the replace is running the fs_devices::num_devices also includes
the replace device, however in some operations like device delete and
balance it needs the actual num_devices without
On 07/20/2018 09:34 AM, Anand Jain wrote:
On 07/19/2018 07:45 PM, David Sterba wrote:
On Mon, Jul 16, 2018 at 10:58:12PM +0800, Anand Jain wrote:
Move the section of the code which performs the check if the device is
indelible, move that into a helper function.
Signed-off-by: Anand Jain
On 07/21/2018 02:01 PM, Lu Fengqi wrote:
On Tue, Jul 03, 2018 at 05:07:24PM +0800, Anand Jain wrote:
When a device is deleted, the btrfs_super_block::number_devices is
reduced by 1, but we do that after the commit transaction, so this
change did not made it to the disk and waits for the next
On 07/23/2018 10:01 PM, David Sterba wrote:
On Mon, Jul 16, 2018 at 10:58:10PM +0800, Anand Jain wrote:
In preparation to de-duplicate a section of code where we deduce the
num_devices, use warn instead of bug.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 2 +-
1 file changed, 1
On 07/23/2018 09:57 PM, David Sterba wrote:
On Fri, Jul 20, 2018 at 07:18:54PM +0800, Anand Jain wrote:
On 07/19/2018 07:53 PM, David Sterba wrote:
On Mon, Jul 16, 2018 at 10:58:11PM +0800, Anand Jain wrote:
When the replace is running the fs_devices::num_devices also includes
the
On 07/24/2018 07:01 PM, David Sterba wrote:
On Tue, Jul 24, 2018 at 05:28:03PM +0800, Lu Fengqi wrote:
I can't reproduce the issue. Do you reproduce consistently? and I
Sorry I've taken so long to reply.
There are four virtual machines with the different storage backend here.
And I can rep
ng sure btrfs_shrink_device() calls the last needed
btrfs_commit_transaction() before the return.
Signed-off-by: Anand Jain
---
I am bit skeptical about the condition when btrfs_commit_transaction()
fails, can you pls be wary about it when reviewing. Thanks.
Lu/David,
As this issues isn't rep
When the replace is running the fs_devices::num_devices also includes
the replace device, however in some operations like device delete and
balance it needs the actual num_devices without the repalce devices, so
now the function btrfs_num_devices() just provides that.
Signed-off-by: Anand Jain
In preparation to add helper function to deduce the num_devices with
replace running, use bug_on instead of warn_on. In btrfs_rm_device()
the check for min devices happens in btrfs_check_raid_min_devices()
but its after its been decremented so a check here is better.
Signed-off-by: Anand Jain
Signed-off-by: Anand Jain
Reviewed-by: David Sterba
---
v3->v4: As we traverse through the seed device, fs_device gets updated with
the child seed fs_devices, so make sure we use the same fs_devices
pointer for the mutex_unlock as used for the mutex_lock.
v2->v3: U
From: Anand Jain
%fs_devices can be free-ed by btrfs_free_stale_devices() when the
close_fs_devices() drops fs_devices::opened to zero, but close_fs_devices
tries to access the %fs_devices again without the device_list_mutex.
Fix this by bringing the %fs_devices access with in the
In this set:
v1->v2:
1/4 no changes.
2/4 no changes.
3/4 added new. Which shall replace the warn_on with bug_on. As the
redundency is after this check. So I decided to keep bug_on for now.
4/4 added comments that btrfs_num_devices() will get num_devices
excluding the repalce device.
Anand Jain
1/2 is renamed from
[PATCH 1/2] btrfs: refactor btrfs_free_stale_device() to get device list
delete
to
[PATCH 1/2] btrfs: add function to device list delete
Adds cli and ioctl to forget a scanned device or forget all stale
devices in the kernel.
Anand Jain (1):
btrfs: introduce feat
ice path is provided.
Again, the devices are removed only if the relevant fsid aren't mounted.
Signed-off-by: Anand Jain
---
fs/btrfs/super.c | 3 +++
fs/btrfs/volumes.c | 9 +
fs/btrfs/volumes.h | 1 +
include/uapi/linux/btrfs.h | 2 ++
4 files changed, 15 in
This patch adds cli
btrfs device forget [dev]
to remove the given device structure in the kernel if the device
is unmounted. If no argument is given it shall remove all stale
(device which are not mounted) from the kernel.
Signed-off-by: Anand Jain
---
cmds-device.c | 58
On 07/26/2018 11:25 PM, Filipe Manana wrote:
On Thu, Jul 26, 2018 at 12:32 PM, Anand Jain wrote:
Support for a new command 'btrfs dev forget [dev]' is proposed here,
to undo the effects of 'btrfs dev scan [dev]'. For this purpose,
this patch proposes to use ioct
Hi Ross,
Thanks for the report. I have analyzed it here [1] earlier and is
harmless since lockdep checks doesn't seem to account for the
difference in the lock time-space, there is similar fix in block
layer as well (which I am unable to pull the ref as of now, but
will try again). And thi
ay, details are in the specific patch.
Patch 1/2 is renamed from
[PATCH 1/2] btrfs: refactor btrfs_free_stale_device() to get device list
delete
to
[PATCH 1/2] btrfs: add function to device list delete
Adds cli and ioctl to forget a scanned device or forget all stale
devices in the kern
er
device is corrupted like in split brain raid1.
. Running test cases which requires btrfs.ko-reload if the rootfs
is btrfs.
Signed-off-by: Anand Jain
---
fs/btrfs/super.c | 3 +++
fs/btrfs/volumes.c | 9 +
fs/btrfs/volumes.h | 1 +
include/uapi/linu
This patch adds cli
btrfs device forget [dev]
to remove the given device structure in the kernel if the device
is unmounted. If no argument is given it shall remove all stale
(device which are not mounted) from the kernel.
Signed-off-by: Anand Jain
---
cmds-device.c | 58
On 07/27/2018 08:04 AM, Naohiro Aota wrote:
When btrfs hits error after modifying fs_devices in
btrfs_init_new_device() (such as btrfs_add_dev_item() returns error), it
leaves everything as is, but frees allocated btrfs_device. As a result,
fs_devices->devices and fs_devices->alloc_list contai
On 08/01/2018 10:29 PM, David Sterba wrote:
On Thu, Jul 26, 2018 at 02:53:32PM +0800, Anand Jain wrote:
From: Anand Jain
%fs_devices can be free-ed by btrfs_free_stale_devices() when the
close_fs_devices() drops fs_devices::opened to zero, but close_fs_devices
tries to access the
wrong.
Signed-off-by: Anand Jain
---
v2->v3: update changelog with not so obvious balance and repalce
co-existance secnario
v1->v2: add comments
fs/btrfs/volumes.c | 32 ++--
1 file changed, 18 insertions(+), 14 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs
On 08/01/2018 10:41 PM, David Sterba wrote:
On Thu, Jul 26, 2018 at 02:53:34PM +0800, Anand Jain wrote:
When the replace is running the fs_devices::num_devices also includes
the replace device, however in some operations like device delete and
balance it needs the actual num_devices without
On 08/02/2018 08:21 PM, David Sterba wrote:
On Thu, Aug 02, 2018 at 01:11:40PM +0300, Nikolay Borisov wrote:
On 2.08.2018 13:09, Anand Jain wrote:
When the replace is running the fs_devices::num_devices also includes
the replace device, however in some operations like device delete and
On 07/31/2018 07:47 PM, Filipe Manana wrote:
On Tue, Jul 31, 2018 at 11:12 AM, Anand Jain wrote:
On 07/27/2018 08:04 AM, Naohiro Aota wrote:
When btrfs hits error after modifying fs_devices in
btrfs_init_new_device() (such as btrfs_add_dev_item() returns error), it
leaves everything as
On 08/03/2018 02:36 PM, Anand Jain wrote:
On 07/31/2018 07:47 PM, Filipe Manana wrote:
On Tue, Jul 31, 2018 at 11:12 AM, Anand Jain
wrote:
On 07/27/2018 08:04 AM, Naohiro Aota wrote:
When btrfs hits error after modifying fs_devices in
btrfs_init_new_device() (such as
On 07/30/2018 10:18 PM, Nikolay Borisov wrote:
On 25.07.2018 16:27, Anand Jain wrote:
test case btrfs/164 reported UAF..
[ 6712.084324] general protection fault: [#1] PREEMPT SMP
::
[ 6712.195423] btrfs_update_commit_device_size+0x75/0xf0 [btrfs]
[ 6712.201424
wrong.
Signed-off-by: Anand Jain
---
v3->v4: add comment and drop the inline (sorry missed it before)
v2->v3: update changelog with not so obvious balance and repalce
co-existance secnario
v1->v2: add comments
fs/btrfs/volumes.c | 38 --
1 file ch
: Nikolay Borisov
Signed-off-by: Anand Jain
---
Hi,
As it fixes the BUG_ON I have spun a new patch for this.
Instead of -EINVAL should we use ASSERT?
fs/btrfs/volumes.c | 27 ---
1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs
l stale
devices in the kernel.
Anand Jain (1):
btrfs: introduce feature to forget a btrfs device
fs/btrfs/super.c | 3 +++
fs/btrfs/volumes.c | 9 +
fs/btrfs/volumes.h | 1 +
include/uapi/linux/btrfs.h | 2 ++
4 files changed, 15 insertions(+)
Anand Jain (1)
This patch adds cli
btrfs device forget [dev]
to remove the given device structure in the kernel if the device
is unmounted. If no argument is given it shall remove all stale
(device which are not mounted) from the kernel.
Signed-off-by: Anand Jain
---
cmds-device.c | 58
er
device is corrupted like in split brain raid1.
. Running test cases which requires btrfs.ko-reload if the rootfs
is btrfs.
Signed-off-by: Anand Jain
---
fs/btrfs/super.c | 3 +++
fs/btrfs/volumes.c | 9 +
fs/btrfs/volumes.h | 1 +
include/uapi/linu
On 08/03/2018 09:33 PM, Nikolay Borisov wrote:
On 3.08.2018 15:45, Anand Jain wrote:
Its a logical bug if we hit fs_devices::num_devices == 1 and if the
replace is running because, as fs_devices::num_devices counts the in memory
devices, so it should include the replace target which is
ng sure btrfs_shrink_device() calls the last needed
btrfs_commit_transaction() before the return.
Reported-by: Lu Fengqi
Signed-off-by: Anand Jain
Tested-by: Lu Fengqi
---
v1->v2: cleanup the dirty and new meta block group before ending
the transaction when btrfs_update_device fails.
fs/btrfs
On 08/07/2018 11:02 PM, David Sterba wrote:
On Thu, Aug 02, 2018 at 09:07:00PM +0800, Anand Jain wrote:
- num_devices = fs_devices->num_devices;
- btrfs_dev_replace_read_lock(&fs_info->dev_replace);
- if (btrfs_dev_replace_is_ongoing(&fs_inf
On 08/08/2018 01:09 AM, David Sterba wrote:
On Mon, Aug 06, 2018 at 04:57:45PM +0800, Anand Jain wrote:
On 08/03/2018 09:33 PM, Nikolay Borisov wrote:
On 3.08.2018 15:45, Anand Jain wrote:
Its a logical bug if we hit fs_devices::num_devices == 1 and if the
replace is running because
On 08/08/2018 01:51 AM, David Sterba wrote:
On Mon, Aug 06, 2018 at 09:09:47AM +0800, Anand Jain wrote:
Adds cli and ioctl to forget a scanned device or forget all stale
devices in the kernel.
Please provide more details about your idea of the usecase, ie. how
excactly and when the command
On 08/07/2018 10:59 PM, David Sterba wrote:
On Thu, Aug 02, 2018 at 05:29:12PM +0800, Anand Jain wrote:
On 08/01/2018 10:29 PM, David Sterba wrote:
On Thu, Jul 26, 2018 at 02:53:32PM +0800, Anand Jain wrote:
From: Anand Jain
%fs_devices can be free-ed by btrfs_free_stale_devices() when
ecting so much of the concerns about
the use of BUG_ON/-EINVAL as its trivial because fundamentally a FS
can't be in the mounted state when num_device < 1.
Anand Jain (3):
btrfs: drop uuid_mutex in btrfs_free_extra_devids()
btrfs: assert for num_devices below 0
btrfs: add helper
In preparation to add helper function to deduce the num_devices with
replace running, use assert instead of bug_on and warn_on.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index
Signed-off-by: Anand Jain
Reviewed-by: David Sterba
---
v3->v4: As we traverse through the seed device, fs_device gets updated with
the child seed fs_devices, so make sure we use the same fs_devices
pointer for the mutex_unlock as used for the mutex_lock.
v2->v3: U
calculation will be wrong.
Signed-off-by: Anand Jain
---
v4->v5: uses assert.
v3->v4: add comment and drop the inline (sorry missed it before)
v2->v3: update changelog with not so obvious balance and repalce
co-existance secnario
v1->v2: add comments
fs/btrfs/vo
Hi David,
Just a gentle ping..
Thanks, Anand
On 08/08/2018 07:33 AM, Anand Jain wrote:
On 08/08/2018 01:51 AM, David Sterba wrote:
On Mon, Aug 06, 2018 at 09:09:47AM +0800, Anand Jain wrote:
Adds cli and ioctl to forget a scanned device or forget all stale
devices in the kernel
On 08/15/2018 08:11 PM, David Sterba wrote:
On Fri, Aug 10, 2018 at 01:53:20PM +0800, Anand Jain wrote:
In preparation to add helper function to deduce the num_devices with
replace running, use assert instead of bug_on and warn_on.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 4
On 08/15/2018 08:20 PM, David Sterba wrote:
On Fri, Aug 10, 2018 at 01:53:18PM +0800, Anand Jain wrote:
The patch set (2/3 and 3/3) adds helper function to deduce the num_device
(which is the number of the devices when device is mounted, this excludes
the seed device however includes the
.
Don't log the md5sum results to the output file as the data size vary by
the sectorsize.
Signed-off-by: Anand Jain
---
common/btrfs| 7 +++
common/filter | 5 +
tests/btrfs/149 | 29 -
tests/btrfs/149.out | 12 ++--
4 files change
On 09/09/2018 11:24 PM, Eryu Guan wrote:
On Wed, Sep 05, 2018 at 02:35:12PM +0800, Anand Jain wrote:
Originally this test case was designed to work with only 4K sectorsize.
Now enhance it to work with any sector sizes and makes the following
changes:
Output file not to contain any traces of
.
Don't log the md5sum results to the output file as the data size vary by
the sectorsize.
Signed-off-by: Anand Jain
---
v1->v2: rename _scratch_sectorsize() to _scratch_btrfs_sectorsize()
add _require_btrfs_command inspect-internal dump-super
common/btrfs| 7 +++
commo
1001 - 1100 of 3682 matches
Mail list logo