There is no other parent for device_list_add() except for
btrfs_scan_one_device(), which would set btrfs_fs_devices::total_devices
if device_list_add is successful and this can be done with in
device_list_add() itself.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 6 ++
1 file changed
Instead of pointer to btrfs_fs_devices from device_list_add() its
better to get pointer to btrfs_device, then we have both, pointer
to btrfs_device and btrfs_fs_devices. This is needed in preparation
to add handling reappearing missing device feature.
Signed-off-by: Anand Jain
---
fs/btrfs
Cleanup of device_list_add(), mainly in preparation to handle
reappearing missing device which its next reroll will be sent
separately.
Anand Jain (5):
btrfs: move pr_info into device_list_add
btrfs: set the total_devices in device_list_add()
btrfs: get device pointer from device_list_add
move uuid_mutex with in device_list_add().
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index f942e8193862..283417bf3b00 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
On 01/10/2018 12:13 AM, Josef Bacik wrote:
On Tue, Jan 09, 2018 at 10:46:23PM +0800, Anand Jain wrote:
Instead of pointer to btrfs_fs_devices from device_list_add() its
better to get pointer to btrfs_device, then we have both, pointer
to btrfs_device and btrfs_fs_devices. This is needed in
On 01/10/2018 12:15 AM, Josef Bacik wrote:
On Tue, Jan 09, 2018 at 10:46:25PM +0800, Anand Jain wrote:
move uuid_mutex with in device_list_add().
Signed-off-by: Anand Jain
This isn't going to work, there's a bunch of places we return errors so this
just deadlocks the box. Lea
Commit 60999ca4b403 ("btrfs: make device scan less noisy")
adds return value 1 to device_list_add(), so that parent function can
call pr_info only when new device is added. Move the pr_info() part
into device_list_add() so that this function can be kept simple.
Signed-off-by: Anand Jain
Instead of pointer to btrfs_fs_devices as an arg in device_list_add()
better to get pointer to btrfs_device as return value, then we have
both, pointer to btrfs_device and btrfs_fs_devices. btrfs_device is
needed to handle reappearing missing device.
Signed-off-by: Anand Jain
---
fs/btrfs
As struct btrfs_disk_super is being passed, so it can get devid
the same way its parent does.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
---
fs/btrfs/volumes.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index
v1->v2:
Drop patch 5/5 for uuid_mutex optimize. That was wrong. Thanks Josef.
In patch 3/5 make btrfs_device * as return.
Cleanup of device_list_add(), mainly in preparation to handle
reappearing missing device which its next reroll will be sent
separately.
Anand Jain (4):
btrfs: m
There is no other parent for device_list_add() except for
btrfs_scan_one_device(), which would set btrfs_fs_devices::total_devices
if device_list_add is successful and this can be done with in
device_list_add() itself.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
---
fs/btrfs/volumes.c
From: Anand Jain
Let the list iterator iterate further and find other stale
devices and delete it. This is in preparation to add support
for user land request-able stale devices cleanup. Also rename
btrfs_free_stale_device() to btrfs_free_stale_devices().
Signed-off-by: Anand Jain
---
fs
We call btrfs_free_stale_device() only when we alloc a new
struct btrfs_device (ret=1), so move it closer to where we
alloc the new device. Also drop the comments.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
---
fs/btrfs/volumes.c | 8 +---
1 file changed, 1 insertion(+), 7
From: Anand Jain
This updates btrfs_free_stale_device() helper function to delete all
unmouted devices, when arg is NULL.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
There is no need to check for btrfs_fs_devices::seeding when we
have checked for btrfs_fs_devices::opened, because we can't sprout
without its seed FS being opened.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
---
fs/btrfs/volumes.c | 2 --
1 file changed, 2 deletions(-)
diff --git
There is no other parent for device_list_add() except for
btrfs_scan_one_device(), which would set btrfs_fs_devices::total_devices
if device_list_add is successful and this can be done with in
device_list_add() itself.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
---
fs/btrfs/volumes.c
No functional changes.
Rename btrfs_free_stale_devices() arg to skip_dev, so that it
reflects what that arg for.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index
tch 5/5 for uuid_mutex optimize. That was wrong. Thanks Josef.
In patch 3/5 make btrfs_device * as return.
Cleanup of device_list_add(), mainly in preparation to handle
reappearing missing device which its next reroll will be sent
separately.
Anand Jain (4):
btrfs: move pr_info into device_list_
Commit 60999ca4b403 ("btrfs: make device scan less noisy")
adds return value 1 to device_list_add(), so that parent function can
call pr_info only when new device is added. Move the pr_info() part
into device_list_add() so that this function can be kept simple.
Signed-off-by: Anand Jain
As struct btrfs_disk_super is being passed, so it can get devid
the same way its parent does.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
---
fs/btrfs/volumes.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index
Instead of pointer to btrfs_fs_devices as an arg in device_list_add()
better to get pointer to btrfs_device as return value, then we have
both, pointer to btrfs_device and btrfs_fs_devices. btrfs_device is
needed to handle reappearing missing device.
Signed-off-by: Anand Jain
---
fs/btrfs
ice() to add feature
to forget a scanned device or all stale devices. So this patch set
proposes following changes to it.
Anand Jain (6):
btrfs: cleanup btrfs_free_stale_device() usage
btrfs: no need to check for btrfs_fs_devices::seeding
btrfs: make btrfs_free_stale_device() to iterate all st
From: Anand Jain
The btrfs_free_stale_device() is updated to match for the given
device path and delete it. (It searches for only unmounted list of
devices.) Also drop the comment about different path being used
for the same device, since now we will have cli to clean any
device that's
@@ -742,7 +741,7 @@ static noinline int device_list_add(const char *path,
if (!fs_devices) {
fs_devices = alloc_fs_devices(disk_super->fsid);
if (IS_ERR(fs_devices))
- return PTR_ERR(fs_devices);
+ return ERR_PT
l will be sent
separately.
Anand Jain (4):
btrfs: move pr_info into device_list_add
btrfs: set the total_devices in device_list_add()
btrfs: get device pointer from device_list_add()
btrfs: drop devid as device_list_add() arg
fs/btrfs/volumes.c | 63 +++-
There is no other parent for device_list_add() except for
btrfs_scan_one_device(), which would set btrfs_fs_devices::total_devices
if device_list_add is successful and this can be done with in
device_list_add() itself.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
---
fs/btrfs/volumes.c
As struct btrfs_disk_super is being passed, so it can get devid
the same way its parent does.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
---
fs/btrfs/volumes.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index
Commit 60999ca4b403 ("btrfs: make device scan less noisy")
adds return value 1 to device_list_add(), so that parent function can
call pr_info only when new device is added. Move the pr_info() part
into device_list_add() so that this function can be kept simple.
Signed-off-by: Anand Jain
Instead of pointer to btrfs_fs_devices as an arg in device_list_add()
better to get pointer to btrfs_device as return value, then we have
both, pointer to btrfs_device and btrfs_fs_devices. btrfs_device is
needed to handle reappearing missing device.
Signed-off-by: Anand Jain
---
fs/btrfs
the kernel using the BTRFS_DEVICE_SPEC_ALL_DEV flag. Remove all
devices functionality would override remove one device when both are
specified in an IOCTL call.
Again, the devices are removed only if the relevant fsid aren't mounted.
Signed-off-by: Anand Jain
---
fs/btrfs/super.c | 27
ATCH 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 feature to forget a btrfs de
This patch adds cli
btrfs device forget [dev]
which shall remove the relevant device entries in the kernel
matching the dev. 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 | 77
Misono,
This change is causing subsequent (subvol) mount to fail when device
option is specified. The simplest eg for failure is ..
mkfs.btrfs -qf /dev/sdc /dev/sdb
mount -o device=/dev/sdb /dev/sdc /btrfs
mount -o device=/dev/sdb /dev/sdc /btrfs1
mount: /dev/sdc is already moun
On 01/16/2018 03:26 AM, David Sterba wrote:
On Fri, Jan 12, 2018 at 06:14:40PM +0800, Anand Jain wrote:
Misono,
This change is causing subsequent (subvol) mount to fail when device
option is specified. The simplest eg for failure is ..
mkfs.btrfs -qf /dev/sdc /dev/sdb
mount
By maintaining the device order consistency it makes reproducing
the problem more consistent. So fix this by having the devices
sorted by some order within the kernel, lets say by devid.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 16
1 file changed, 16 insertions
Add opened device to the tail of dev_alloc_list so that it maintains
the same order as dev_list.
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 68be58a5b03f..543c166049e7 100644
By maintaining the device order (some) consistency it makes reproducing
the problem more consistent.
Anand Jain (2):
btrfs: fix device order consistency
btrfs: fix alloc device order consistency
fs/btrfs/volumes.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion
: d1f6ad52c3f93a9da45e11001e0a0be8f3c31e9e ("btrfs: add support for
SUPER_FLAG_CHANGING_FSID in btrfs.ko")
url:
https://github.com/0day-ci/linux/commits/Anand-Jain/btrfs-add-missing-BTRFS_SUPER_FLAG-define/20180109-041023
base: https://git.kernel.org/cgit/linux/kernel/git/mason/linux-btrfs.git next
i
On 01/17/2018 04:30 PM, Misono, Tomohiro wrote:
On 2018/01/16 20:45, Anand Jain wrote:
On 01/16/2018 03:26 AM, David Sterba wrote:
On Fri, Jan 12, 2018 at 06:14:40PM +0800, Anand Jain wrote:
Misono,
This change is causing subsequent (subvol) mount to fail when device
option is
fs_scan_one_device() in
the path of device ready/scan ioctl.
Reviewed-by: Anand Jain
Thanks, Anand
Signed-off-by: Tomohiro Misono
---
fs/btrfs/super.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 9438d32c4267..6ff13
On 01/18/2018 04:32 PM, Nikolay Borisov wrote:
On 18.01.2018 04:32, Anand Jain wrote:
By maintaining the device order consistency it makes reproducing
the problem more consistent. So fix this by having the devices
Which problem is that ?
I noticed when trying to reproduce raid1 missed
From: Anand Jain
This updates btrfs_free_stale_devices() helper function to delete all
unmouted devices, when arg is NULL.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
---
fs/btrfs/volumes.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs
From: Anand Jain
Let the list iterator iterate further and find other stale
devices and delete it. This is in preparation to add support
for user land request-able stale devices cleanup. Also rename
btrfs_free_stale_device() to btrfs_free_stale_devices().
Signed-off-by: Anand Jain
Reviewed-by
We call btrfs_free_stale_device() only when we alloc a new
struct btrfs_device (ret=1), so move it closer to where we
alloc the new device. Also drop the comments.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
---
fs/btrfs/volumes.c | 8 +---
1 file changed, 1 insertion(+), 7
btrfs_device::name is null when we have missing device and
unmounted. So we still need to check for dev->name.
We can reuse the function btrfs_free_stale_device() to add feature
to forget a scanned device or all stale devices. So this patch set
proposes following changes to it.
Anand Jain (6):
No functional changes.
Rename btrfs_free_stale_devices() arg to skip_dev, so that it
reflects what that arg for.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
---
fs/btrfs/volumes.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs
There is no need to check for btrfs_fs_devices::seeding when we
have checked for btrfs_fs_devices::opened, because we can't sprout
without its seed FS being opened.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
---
fs/btrfs/volumes.c | 2 --
1 file changed, 2 deletions(-)
diff --git
From: Anand Jain
The btrfs_free_stale_devices() is updated to match for the given
device path and delete it. (It searches for only unmounted list of
devices.) Also drop the comment about different path being used
for the same device, since now we will have cli to clean any
device that's
l will be sent
separately.
Anand Jain (4):
btrfs: move pr_info into device_list_add
btrfs: set the total_devices in device_list_add()
btrfs: get device pointer from device_list_add()
btrfs: drop devid as device_list_add() arg
fs/btrfs/volumes.c | 63 +++-
Commit 60999ca4b403 ("btrfs: make device scan less noisy")
adds return value 1 to device_list_add(), so that parent function can
call pr_info only when new device is added. Move the pr_info() part
into device_list_add() so that this function can be kept simple.
Signed-off-by: Anand Jain
As struct btrfs_disk_super is being passed, so it can get devid
the same way its parent does.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
---
fs/btrfs/volumes.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index
Instead of pointer to btrfs_fs_devices as an arg in device_list_add()
better to get pointer to btrfs_device as return value, then we have
both, pointer to btrfs_device and btrfs_fs_devices. btrfs_device is
needed to handle reappearing missing device.
Signed-off-by: Anand Jain
---
fs/btrfs
There is no other parent for device_list_add() except for
btrfs_scan_one_device(), which would set btrfs_fs_devices::total_devices
if device_list_add is successful and this can be done with in
device_list_add() itself.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
---
fs/btrfs/volumes.c
cleanup() to umount SCRATCH_MNT by
011 itself.
Signed-off-by: Liu Bo
Reviewed-by: Anand Jain
Tested-by: Anand Jain
Thanks, Anand
---
tests/btrfs/011 | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/btrfs/011 b/tests/btrfs/011
index 28f1388..f4c5309 100755
--- a/tests/btrfs/011
On 01/05/2018 10:09 PM, David Sterba wrote:
On Fri, Dec 15, 2017 at 03:40:14PM +0800, Anand Jain wrote:
No functional change. First set the usual case, writeable then check
for any special config.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 8 +++-
1 file changed, 3 insertions
Move uuid_mutex closer to the exclusion section.
Signed-off-by: Anand Jain
Reviewed-by: David Sterba
---
v1->v1:
No change. Add received reviewed-by. Thxs.
fs/btrfs/volumes.c | 17 -
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/bt
From: Anand Jain
First set the usual case that is writeable, then check
for any special case like a seed device or a rdonly device
and set the state appropriately.
Signed-off-by: Anand Jain
---
v1->v2:
Add comment and commit log to explain its safe to set writeable
first and then reset
Move uuid_mutex closer to the exclusion section.
Signed-off-by: Anand Jain
Reviewed-by: David Sterba
---
v2->v2.1: updated the v2 reroll log below.
v1->v2:
Add received reviewed-by. Thxs.
Fix conflict on top of kdave misc-next.
fs/btrfs/volumes.c | 17 -
1 file chan
From: Anand Jain
First set the usual case that is writeable, then check
for any special case like a seed device or a rdonly device
and set the state appropriately.
Signed-off-by: Anand Jain
---
v1->v2:
Add comments, and update change log.
fs/btrfs/volumes.c | 14 +-
1 f
On 01/20/2018 07:27 AM, David Sterba wrote:
On Thu, Jan 18, 2018 at 06:47:17PM +0100, David Sterba wrote:
On Thu, Jan 18, 2018 at 10:02:32PM +0800, Anand Jain wrote:
(Apply on top of my patchset
[PATCH v4 0/6] preparatory work to add device forget
for conflict free apply. They don
Commit 60999ca4b403 ("btrfs: make device scan less noisy")
adds return value 1 to device_list_add(), so that parent function can
call pr_info only when new device is added. Move the pr_info() part
into device_list_add() so that this function can be kept simple.
Signed-off-by: Anand Jain
Instead of pointer to btrfs_fs_devices as an arg in device_list_add()
better to get pointer to btrfs_device as return value, then we have
both, pointer to btrfs_device and btrfs_fs_devices. btrfs_device is
needed to handle reappearing missing device.
Signed-off-by: Anand Jain
---
fs/btrfs
There is no other parent for device_list_add() except for
btrfs_scan_one_device(), which would set btrfs_fs_devices::total_devices
if device_list_add is successful and this can be done with in
device_list_add() itself.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
---
fs/btrfs/volumes.c
As struct btrfs_disk_super is being passed, so it can get devid
the same way its parent does.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
---
fs/btrfs/volumes.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index
return.
Cleanup of device_list_add(), mainly in preparation to handle
reappearing missing device which its next reroll will be sent
separately.
*** BLURB HERE ***
Anand Jain (4):
btrfs: move pr_info into device_list_add
btrfs: set the total_devices in device_list_add()
btrfs: get de
On 01/22/2018 11:26 PM, David Sterba wrote:
On Mon, Jan 22, 2018 at 09:31:47PM +0800, Anand Jain wrote:
Problem was mainly due to the patch 3/4, which tried to access the
return pointer even for the failed condition. The fix is to bring the
device point access under the else part as
cing
the missing chunk related problems more consistent. (More fixes of this
sort is coming up).
Anand Jain (2):
btrfs: fix device order consistency
btrfs: fix alloc device order consistency
fs/btrfs/volumes.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
--
2.7.
devices are having and same
SB generation.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 16
1 file changed, 16 insertions(+)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 03f2685a5018..98e41d286283 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
Add opened device to the tail of dev_alloc_list instead of head, so that
it maintains the same order as dev_list.
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 98e41d286283
nitpick:
typo in $subject.
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 http://vger.kernel.org/majordomo-info.html
ned by the
__btrfs_open_devices() and is based on the generation number again.
So this patch deletes btrfs_close_extra_devices() function and its calls
as there is no use of it.
Signed-off-by: Anand Jain
---
fs/btrfs/disk-io.c | 13 ---
fs/btrfs/volu
The fix is to use 'break' when we know we are freeing the current
fs_devs.
No break is needed as we need to iterate all stale devices and delete
the found stale entry, so commit [1] used list_for_each_entry_safe()
and removed the break,
[1]
commit 38cf665d338fca33af4b16f9ec7cad6
On 01/29/2018 03:01 PM, Nikolay Borisov wrote:
On 29.01.2018 04:38, Anand Jain wrote:
On 01/26/2018 09:20 PM, Nikolay Borisov wrote:
Commit 4fde46f0cc71 ("Btrfs: free the stale device") introduced
btrfs_free_stale_device which iterates the device lists for all
regist
: scripts/coccinelle/api/err_cast.cocci
Fixes: bf155c98d312 ("btrfs: get device pointer from device_list_add()")
CC: Anand Jain
Signed-off-by: Fengguang Wu
Thanks for the fix, I'll fold it to the patch.
Oh. I just saw this email thread, err my filters. sorry.
Thanks for the fix.
Obtain the stripes info from the map directly and so no need
to pass it as an argument.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index f7147740b68e..9c9d987838c2
Adds cleanups to find_live_mirror(), so that we can add more
policy on how the read mirror device should be found.
Anand Jain (2):
btrfs: drop num argument from find_live_mirror()
btrfs: drop optimal argument from find_live_mirror()
fs/btrfs/volumes.c | 20 ++--
1 file
h set:
[PATCH 0/2] Preparatory to add read_mirror mount option
Anand Jain (2):
btrfs: add mount option read_mirror_policy
btrfs: add read_mirror_policy parameter devid
fs/btrfs/ctree.h | 2 ++
fs/btrfs/super.c | 31 +++
fs/btrfs/volumes.c | 18 +
.
Signed-off-by: Anand Jain
---
fs/btrfs/super.c | 21 +
fs/btrfs/volumes.c | 10 ++
fs/btrfs/volumes.h | 2 ++
3 files changed, 33 insertions(+)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index dfe6b3c67df3..d3aad87e 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs
Drop optimal argument from the function find_live_mirror()
as we can deduce it in the function itself.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 9c9d987838c2
$pid policy configurable from the mount option.
For example..
mount -o read_mirror_policy=pid (which is also default)
Signed-off-by: Anand Jain
---
fs/btrfs/ctree.h | 2 ++
fs/btrfs/super.c | 10 ++
fs/btrfs/volumes.c | 8 +++-
fs/btrfs/volumes.h | 5 +
4 files changed
to define it as a normal
function.
This also makes later code re-use between kernel and btrfs-progs
easier.
Signed-off-by: Qu Wenruo
Reviewed-by: Anand Jain
Thanks, Anand
---
fs/btrfs/extent-tree.c | 26 --
fs/btrfs/volumes.c | 2 +-
fs/btrfs
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index e9c31b567a9c..6e1128aa29d6 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -7346,7 +7346,8 @@ wait_block_group_cache_done(struct
btrfs_block_group_cache *cache)
return ret;
}
-int get_block_gro
On 01/30/2018 03:40 PM, Qu Wenruo wrote:
Signed-off-by: Qu Wenruo
Reviewed-by: Anand Jain
Thanks, Anand
---
fs/btrfs/volumes.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index d818b1f9c625..215e85e22c8e 100644
On 01/30/2018 05:12 PM, Nikolay Borisov wrote:
On 30.01.2018 08:28, Anand Jain wrote:
Drop optimal argument from the function find_live_mirror()
as we can deduce it in the function itself.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 8
1 file changed, 4 insertions(+), 4
+static int device_sort(void *priv, struct list_head *a, struct list_head *b)
I'll rename that to devid_cmp as it's the comparator and not really a
sorting function.
Ok. I will make that change in v3.
Thanks,
Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
devices are having and same
SB generation.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 16
1 file changed, 16 insertions(+)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index b5036bd69e6a..0109f370ad5b 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
oducing
the missing chunk related problems more consistent. (More fixes of this
sort is coming up).
Anand Jain (2):
btrfs: fix device order consistency
btrfs: fix alloc device order consistency
fs/btrfs/volumes.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
--
n writing this patch.
Thanks for the fix.
Reviewed-by: Anand Jain
Thanks, Anand
---
fs/btrfs/extent-tree.c | 4
1 file changed, 4 insertions(+)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 9d220b276c8f..d59ee24645e3 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs
Add opened device to the tail of dev_alloc_list instead of head, so that
it maintains the same order as dev_list.
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 0109f370ad5b
On 01/31/2018 03:51 PM, Peter Becker wrote:
A little question about mount -o read_mirror_policy=.
How would this work with RAID1 over 3 or 4 HDD's?
In particular, if the desired block is not available on device .
When a stripe is not present on the read optimized disk it will just
use the
On 01/31/2018 04:06 PM, Nikolay Borisov wrote:
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 1a462ab85c49..4759e988b0df 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1100,6 +1100,8 @@ struct btrfs_fs_info {
spinlock_t ref_verify_lock;
struct rb_root block_tr
On 01/31/2018 04:38 PM, Nikolay Borisov wrote:
On 30.01.2018 08:30, Anand Jain wrote:
Adds the mount option:
mount -o read_mirror_policy=
To set the devid of the device which should be used for read. That
means all the normal reads will go to that particular device only.
This also
On 01/31/2018 05:54 PM, Nikolay Borisov wrote:
On 31.01.2018 11:28, Anand Jain wrote:
On 01/31/2018 04:38 PM, Nikolay Borisov wrote:
On 30.01.2018 08:30, Anand Jain wrote:
Adds the mount option:
mount -o read_mirror_policy=
To set the devid of the device which should be used for
On 01/31/2018 06:47 PM, Peter Becker wrote:
2018-01-31 10:01 GMT+01:00 Anand Jain :
When a stripe is not present on the read optimized disk it will just
use the lower devid disk containing the stripe (instead of failing back
to the pid based random disk).
Is this a good behavior
On 01/31/2018 09:42 PM, Nikolay Borisov wrote:
So usually this should be functionality handled by the raid/san
controller I guess, > but given that btrfs is playing the role of a
controller here at what point are we drawing the line of not
implementing block-level functionality into the files
On 02/01/2018 01:26 PM, Edmund Nadolski wrote:
On 1/31/18 7:36 AM, Anand Jain wrote:
On 01/31/2018 09:42 PM, Nikolay Borisov wrote:
So usually this should be functionality handled by the raid/san
controller I guess, > but given that btrfs is playing the role of a
controller here at w
On 10/8/19 1:41 AM, David Sterba wrote:
On Wed, Oct 02, 2019 at 12:11:52PM +0800, Anand Jain wrote:
To help debug device scan issues, add verbose option to btrfs device scan.
The common options like --verbose are going to be added into the global
command so I'd rather avoid adding them t
On 10/8/19 1:03 AM, David Sterba wrote:
On Mon, Oct 07, 2019 at 09:37:49PM +0800, Qu Wenruo wrote:
On 2019/10/7 下午9:30, Nikolay Borisov wrote:
On 7.10.19 г. 12:45 ч., Anand Jain wrote:
Following test case explains it all, even though the degraded mount is
successful the btrfs-progs fails
On 10/8/19 1:36 AM, David Sterba wrote:
On Mon, Oct 07, 2019 at 05:45:10PM +0800, Anand Jain wrote:
v3: Fix alien device is due to wipefs in Patch4.
Fix a nit in Patch3.
Patches are reordered.
Alien device is a device in fs_devices list having a different fsid than
the expected fsid
(), free_extent_buffer_stale(),
release_extent_buffer() and alloc_extent_buffer() in free_eb label ;-)
-ditto- ;-)
Reviewed-by: Anand Jain
Reviewed-by: Johannes Thumshirn
801 - 900 of 3682 matches
Mail list logo