ed-off-by: Nikolay Borisov
Reviewed-by: Anand Jain
Thanks, Anand
---
V2:
* Fixed build failure due to using old name of free_device_rcu function.
fs/btrfs/volumes.c | 26 ++
1 file changed, 6 insertions(+), 20 deletions(-)
diff --git a/fs/btrfs/volumes.c b
On 06/29/2018 02:26 AM, David Sterba wrote:
On Thu, Jun 28, 2018 at 07:22:59PM +0800, Anand Jain wrote:
The circular locking dependency warning occurs at FSSTRESS_PROG.
And in particular at doproc() in xfstests/ltp/fsstress.c, randomly
at any of the command at
opdesc_tops
On 06/28/2018 04:02 PM, Qu Wenruo wrote:
Also CC Anand Jain, since he is also working on various device related
work, and an expert on this.
Especially I'm not pretty sure if such enhancement is already on his
agenda or there are already some unmerged patch for this.
Right, some
On 06/28/2018 09:42 AM, Remi Gauvin wrote:
There seems to be a major design flaw with BTRFS that needs to be better
documented, to avoid massive data loss.
Tested with Raid 1 on Ubuntu Kernel 4.15
The use case being tested was a Virtualbox VDI file created with
NODATACOW attribute, (as is
On 06/12/2018 12:16 AM, David Sterba wrote:
On Mon, Jun 11, 2018 at 10:50:54AM +0100, Filipe Manana wrote:
btrfs: replace uuid_mutex by device_list_mutex in
btrfs_open_devices
*
* the mutex can be very coarse and can cover long-running operations
*
* protects: updates
On 06/26/2018 08:19 PM, David Sterba wrote:
On Tue, Jun 26, 2018 at 02:25:11PM +0800, Anand Jain wrote:
(sorry for the delay in reply due to my vacation and, other
urgent things took my priority too).
Please see inline below.
On 06/19/2018 09:53 PM, David Sterba wrote:
On Thu, Jun
On 06/21/2018 01:51 AM, David Sterba wrote:
Technically this extends the critical section covered by uuid_mutex to:
- parse early mount options -- here we can call device scan on paths
that can be passed as 'device=/dev/...'
- scan the device passed to mount
- open the devices related
On 06/21/2018 01:51 AM, David Sterba wrote:
The stale device list removal needs to be protected by device_list_mutex
too as this could delete from the list and could race with another list
modification and cause crash.
Its is very less likely or almost practically impossible (unless
On 06/20/2018 10:06 PM, David Sterba wrote:
On Mon, Jun 04, 2018 at 11:00:30PM +0800, Anand Jain wrote:
In an instrumented testing it is possible that the mount and
a newer mkfs.btrfs thread on the same device can race and if the new
mkfs.btrfs wins it will free the older fs_devices
(sorry for the delay in reply due to my vacation and, other
urgent things took my priority too).
Please see inline below.
On 06/19/2018 09:53 PM, David Sterba wrote:
On Thu, Jun 07, 2018 at 06:39:32PM +0200, David Sterba wrote:
On Mon, Jun 04, 2018 at 11:00:30PM +0800, Anand Jain wrote
)
Al Viro (1):
btrfs: take the last remnants of ->d_fsdata use out
Anand Jain (19):
btrfs: add comment about BTRFS_FS_EXCL_OP
btrfs: rename struct btrfs_fs_devices::list
btrfs: cleanup __btrfs_open_devices() drop head pointer
btrfs: rename __btrfs_close_devi
-by: Anand Jain
---
fs/btrfs/volumes.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index c2b7d66192e8..32fba4e24027 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1153,6 +1153,12 @@ static int close_fs_devices(struct
On 06/01/2018 09:34 AM, Qu Wenruo wrote:
This is a long existing bug (from 2012) but exposed by a reporter
recently, that when compressed extent without data csum get written to
device-replace target device, the written data is in fact uncompressed data
other than the original compressed
Add bitmap btrfs_fs_devices::volume_state to maintain the volume states and
flags. This patch in perticular converts btrfs_fs_devices::rotating into
flag BTRFS_VOLUME_STATE_ROTATING.
Signed-off-by: Anand Jain
---
fs/btrfs/disk-io.c | 3 ++-
fs/btrfs/volumes.c | 7 ---
fs/btrfs/volumes.h
This patch converts btrfs_fs_devices::seeding into flag
BTRFS_VOL_FLAG_SEEDING.
Signed-off-by: Anand Jain
---
fs/btrfs/dev-replace.c | 3 ++-
fs/btrfs/volumes.c | 25 +++--
fs/btrfs/volumes.h | 2 +-
3 files changed, 18 insertions(+), 12 deletions(-)
diff --git
Fix this with a mutually exclusive flag BTRFS_VOL_FLAG_EXCL_OPS.
Signed-off-by: Anand Jain
---
fs/btrfs/super.c | 6 ++
fs/btrfs/volumes.c | 10 +-
fs/btrfs/volumes.h | 1 +
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index f0c13defc
Test case to verify that a seed device can be replaced
Signed-off-by: Anand Jain
---
v2->v3: New line for the test subject
Drop author name
add _require_command "$BTRFS_TUNE_PROG" btrfstune
rename to small letters for the local variables
v2: Born
te
Test case to verify that a sprout device can be a seed device
Signed-off-by: Anand Jain
---
v2->v3: New line for the test subject
Drop author name
add _require_command "$BTRFS_TUNE_PROG" btrfstune
rename to small letters for the local variables
v2: Born
te
Test case to verify that a seed device can be deleted
Signed-off-by: Anand Jain
---
v2->v3: New line for the test subject
Drop author name
add _require_command "$BTRFS_TUNE_PROG" btrfstune
rename to small letters for the local variables
v2: Born
te
Create a seed device and add the sprout device to it.
Signed-off-by: Anand Jain
---
v2->v3: New line for the test subject
Drop author name
add _require_command "$BTRFS_TUNE_PROG" btrfstune
rename to small letters for the local variables
v1->v2: Use
out opertions.
Anand Jain (4):
fstests: btrfs: add seed sprout functionality test
fstests: btrfs: nested seed device test
fstests: btrfs: seed device replace test
fstests: btrfs: seed device delete test
common/config | 1 +
tests/btrfs/161 |
On 05/29/2018 09:48 PM, Eryu Guan wrote:
On Mon, May 28, 2018 at 05:51:45PM +0800, Anand Jain wrote:
Create a seed device and add the sprout device to it.
Signed-off-by: Anand Jain
This series looks fine to me from fstests' point of view, there're just
some really minor common issues
No functional changes.
Signed-off-by: Anand Jain
---
Hi David,
Can you please fixup this with
btrfs: balance: prefix kernel logs
there were two more places where we could make balance logging
consistent but it was missed before. Thanks.
fs/btrfs/disk-io.c | 4 ++--
1 file changed, 2
-by: Anand Jain
---
The changes here are on top the patch other btrfs_rm_device patches..
[PATCH 1/2] btrfs: fix parent in memory total_devices after seed delete
[PATCH 2/2] btrfs: fix missing superblock update in the device delete commit
transaction
But they are not related.
fs/btrfs/volumes.c | 18
rfs
mount $dev2 /btrfs
btrfs dev del $dev1 /btrfs
btrfs dev ready $dev2; echo RESULT=$?
Signed-off-by: Anand Jain
---
The seed device test case needs to fix the bug as in the patch,
[PATCH 1/2] btrfs: fix parent in memory total_devices after seed delete
As there is a bug in the btrfs_device
update its corresponding
btrfs_super_block::number_devices.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index d3f9efbef9a9..5296f26be2f6 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
btrfs_free_stale_devices() finds the stale (not opened) matching
device path in the fs_uuid list. We are already under uuid_mutex
so when we check for each fs_devices, hold the respective
device_list_mutex.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 25 +++--
1 file
btrfs_free_stale_devices() is a static function drop the btrfs prefix.
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 a6a23b0185e5..afb3504f4097 100644
--- a/fs/btrfs
Over the years we named %fs_devices and %devices to represent,
the struct btrfs_fs_devices and the struct btrfs_device. So
follow the same norm here too. No functional changes.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 35 ++-
1 file changed, 18
Include items of fs_uuids::fs_devices to be protected by
device_list_mutex, like (but not limited to) fs_devices::opened,
fs_devices::total_devices and fs_devices::num_devices. This is
been done in the code already.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 3 ++-
1 file changed, 2
When the device is added or if the device pointer is retrieved
for writing, make sure that device_list_mutex is held. Also
make sure it is held when we check fs_devices::opened and
fs_devices::total_devices is updated.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 16
1
purpose.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 0a47b4162d12..4edba7c5c050 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -750,7 +750,8 @@ static
().
Patch 6/6 renames btrfs_free_stale_device() to free_stale_device(), no
functional changes.
Anand Jain (6):
btrfs: do btrfs_free_stale_devices() outside of device_list_add()
btrfs: fix device_list_add() missing device_list_mutex()
btrfs: update device_list_mutex protected items
btrfs
On 05/29/2018 02:50 PM, Gu Jinxiang wrote:
From: Gu JinXiang
patch for commit 921518924084
("btrfs: handle dynamically reappearing missing device").
---
v4:
::
. No need to set in_fs_metadata flag as its already set on missing device
---
> Since BTRFS_DEV_STATE_IN_FS_METADATA will be clear
is helpful to verify
the btrfs volume related changes.
Run as
./check -g btrfs/volume
Signed-off-by: Anand Jain
---
tests/btrfs/group | 40
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/tests/btrfs/group b/tests/btrfs/group
index
On 05/29/2018 06:57 AM, Anand Jain wrote:
On 05/28/2018 11:40 PM, David Sterba wrote:
On Mon, May 28, 2018 at 10:43:29PM +0800, Anand Jain wrote:
btrfs_free_extra_devids() is called only in the mount context which
traverses through the fs_devices::devices and frees the orphan devices
On 05/28/2018 11:40 PM, David Sterba wrote:
On Mon, May 28, 2018 at 10:43:29PM +0800, Anand Jain wrote:
btrfs_free_extra_devids() is called only in the mount context which
traverses through the fs_devices::devices and frees the orphan devices
devices in the given %fs_devices if any
-by: Anand Jain <anand.j...@oracle.com>
---
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 top most
fs_devices pointer.
v2->v3: Update change log.
(Currently device_list_add() is very
-by: Anand Jain <anand.j...@oracle.com>
---
(I didn't see this email in the mailing list, so trying again).
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 mut
Test case to verify that a sprout device can be a seed device
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
tests/btrfs/162 | 103
tests/btrfs/162.out | 9 +
tests/btrfs/group | 1 +
3 files changed, 113 inse
Test case to verify that a seed device can be deleted
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
tests/btrfs/164 | 114
tests/btrfs/164.out | 9 +
tests/btrfs/group | 1 +
3 files changed, 124 insertions(+)
Test case to verify that a seed device can be replaced
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
tests/btrfs/163 | 114
tests/btrfs/163.out | 9 +
tests/btrfs/group | 1 +
3 files changed, 124 insertions(+)
Create a seed device and add the sprout device to it.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v1->v2: Use functions to do the respective operations. Add data
verification.
common/config | 1 +
tests/btrfs/161
1/4 was sent separately which is now integrated into this set, with some
changes as indicated in the patch.
Though rest of the patches 2/4..4/4 are new, they carry the set version v2.
These test cases verify the seed sprout opertions.
Anand Jain (4):
fstests: btrfs: add seed sprout
On 05/25/2018 10:59 AM, Qu Wenruo wrote:
On 2018年05月25日 08:54, Qu Wenruo wrote:
On 2018年05月25日 00:24, Anand Jain wrote:
On misc-next this patch is causing regression, the seed sprout
functionality test [1] (in the mailing list) fails.
[1]
[PATCH] fstests: btrfs: add seed sprout
=10..20
-msoft,profiles=raid1,convert=single -ssoft,profiles=raid1,convert=single
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v4->v4.1b: Rename last missed sz to size_buf.
Allocate at least (64*3) 192 bytes for tmp_buf.
Log format change: No space afte
mit=10..20
M:soft,profiles=raid1,convert=single S:soft,profiles=raid1,convert=single
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v4->v4.1a: Rename last missed sz to size_buf.
Allocate at least (64*3) 192 bytes for tmp_buf.
Log format change: Use CAPS abbrevia
On 05/24/2018 09:03 PM, David Sterba wrote:
On Wed, May 23, 2018 at 02:35:07PM +0800, Anand Jain wrote:
Balance arg info is an important information to be reviewed for the
system audit. So this patch adds them to the kernel log.
Example:
->btrfs bal start --full-balance -f -mprofiles=ra
Improve on describe_relocation() add a common helper function to describe
the block groups.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
Reviewed-by: David Sterba <dste...@suse.com>
---
v4->v4.1: Use strcpy(buf, "|NONE"); as in the original
v3->v4: Just pass
On 05/24/2018 08:43 PM, David Sterba wrote:
On Wed, May 23, 2018 at 02:35:06PM +0800, Anand Jain wrote:
Improve on describe_relocation() add a common helper function to describe
the block groups.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v3->v4: Just pass full
On misc-next this patch is causing regression, the seed sprout
functionality test [1] (in the mailing list) fails.
[1]
[PATCH] fstests: btrfs: add seed sprout functionality test
more below..
On 05/11/2018 01:35 PM, Qu Wenruo wrote:
Just move btrfs_check_super_valid() before its single
Create a seed device and add the sprout device to it.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
common/config | 1 +
tests/btrfs/161 | 69 +
tests/btrfs/161.out | 2 ++
tests/btrfs/group | 1 +
4 files chang
Add a kernel log when the balance ends, either for cancel or completed
or if it is paused.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v3->v4: nothing.
v2->v3: nothing.
v1->v2: Moved from 2/3 to 3/3
fs/btrfs/volumes.c | 7 +++
1 file changed, 7 insertions(+)
diff -
Improve on describe_relocation() add a common helper function to describe
the block groups.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v3->v4: Just pass full flag name in the define DESCRIBE_FLAG(flag,..),
so that it can be used at couple of more places.
-d usage=50,limit=10..20 -m
soft,profiles=raid1,convert=single -s soft,profiles=raid1,convert=single
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v3->v4: Change log updated with new example.
Log format is changed to almost match with the cli.
snprintf drop %s for i
alance logs easy to review.
Anand Jain (3):
btrfs: add helper function describe_block_group()
btrfs: balance: add args info during start and resume
btrfs: balance: add kernel log for end or paused
fs/btrfs/relocation.c | 30 ++-
fs/btrfs/volumes.c
On 05/22/2018 08:26 PM, David Sterba wrote:
On Mon, May 21, 2018 at 02:37:43PM +0800, Anand Jain wrote:
Improve on describe_relocation() add a common helper function to describe
the block groups.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v3: Born.
fs/btrfs/relocation.
On 05/22/2018 08:35 PM, David Sterba wrote:
On Mon, May 21, 2018 at 02:37:44PM +0800, Anand Jain wrote:
Balance arg info is an important information to be reviewed for the
system audit. So this patch adds them to the kernel log.
Example:
-> btrfs bal start -dprofiles='raid1|single',conv
-by: Anand Jain <anand.j...@oracle.com>
---
Currently device_list_add() is very lean on its device_list_mutex usage,
a cleanup and fix is wip. Given the practicality of the above race
condition this patch is good to merge.
fs/btrfs/volumes.c | 5 ++---
1 file changed, 2 insertions(+), 3 del
close_fs_devices() closes devices of a given fsid, and it is limited
to all the devices of a fsid, so we don't have to hold the global
uuid_mutex, instead we need the device_list_mutex as the device state is
being changed.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v1->v2: Ad
btrfs_free_extra_devids() frees the orphan fsid::devid with in
btrfs_fs_devices::devices, so we dont need uuid_mutex, instead hold the
btrfs_fs_devices::device_list_mutex.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v1->v2: replace uuid_mutex with device_list_mutex instead
On 05/16/2018 12:33 AM, David Sterba wrote:
On Thu, Apr 12, 2018 at 10:29:23AM +0800, Anand Jain wrote:
uuid_mutex lock is not a per-fs lock but a global lock. The main aim of
this patch-set is to critically review the usage of this lock, and delete
the unnecessary once. By doing this we
On 05/16/2018 12:30 AM, David Sterba wrote:
On Thu, Apr 12, 2018 at 10:29:35AM +0800, Anand Jain wrote:
close_fs_devices() closes devices of a given fsid, and it is limited
to all the devices of a fsid, so we don't have to hold the global
uuid_mutex, instead we need the device_list_mutex
On 05/16/2018 12:26 AM, David Sterba wrote:
On Thu, Apr 12, 2018 at 10:29:33AM +0800, Anand Jain wrote:
btrfs_free_extra_devids() frees the orphan fsid::devid but its search is
limited to btrfs_fs_devices::devices, so we dont need uuid_mutex.
From that it's not clear why there's no locking
Add a kernel log when the balance ends, either for cancel or completed
or if it is paused.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v2->v3: nothing.
v1->v2: Moved from 2/3 to 3/3
fs/btrfs/volumes.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/fs/btrfs/vo
Based on misc-next.
v2->v3:
Inspried by describe_relocation(), improves it, makes it a helper
function and use it to log the balance operations.
Kernel logs are very important for the forensic investigations of the
issues, these patchs make balance logs easy to review.
Anand Jain
Balance arg info is an important information to be reviewed for the
system audit. So this patch adds them to the kernel log.
Example:
-> btrfs bal start -dprofiles='raid1|single',convert=raid5
-mprofiles='raid1|single',convert=raid5 /btrfs
kernel: BTRFS info (device sdb): balance: start
On 05/17/2018 08:06 PM, David Sterba wrote:
On Wed, May 16, 2018 at 10:51:28AM +0800, Anand Jain wrote:
Add a kernel log when the balance ends, either for cancel or completed
or if it is paused.
Missing S-O-B.
oops. Fixed in v3.
---
v1->v2: Moved from 2/3 to 3/3
fs/btrfs/volume
Improve on describe_relocation() add a common helper function to describe
the block groups.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v3: Born.
fs/btrfs/relocation.c | 30 +++---
fs/btrfs/volumes.c| 44 ++
On 05/17/2018 07:59 PM, David Sterba wrote:
On Wed, May 16, 2018 at 10:51:27AM +0800, Anand Jain wrote:
Balance args info is an important information to be reviewed for the
system audit. So this patch adds it to the kernel log.
Example:
-> btrfs bal start -dprofiles='raid1|single',conv
On 05/17/2018 10:46 PM, Jeff Mahoney wrote:
On 5/17/18 8:25 AM, Austin S. Hemmelgarn wrote:
On 2018-05-16 22:32, Anand Jain wrote:
On 05/17/2018 06:35 AM, David Sterba wrote:
On Wed, May 16, 2018 at 06:03:56PM +0800, Anand Jain wrote:
Not yet ready for the integration. As I need to introduce
Looks like the original idea was to print the hex of the flags which
is not coded with their flag name. So use the current buf pointer bp
instead of buf.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/relocation.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
On 05/16/2018 10:35 PM, David Sterba wrote:
On Mon, Apr 30, 2018 at 05:48:45PM +0800, Anand Jain wrote:
We set the BTRFS_BALANCE_RESUME flag in the btrfs_recover_balance(),
which is not called during the remount. So when resuming from the
paused balance we hit BUG.
kernel: kernel BUG at fs
the BTRFS_BALANCE_RESUME flag in btrfs_resume_balance_async().
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v2->v3: . Hold fs_info->balance_lock because in remount context there can
be more the one thread accessing the balance_ctl.
. Don't remove the BTRFS_BALANCE_RESUME set at rec
On 05/17/2018 06:35 AM, David Sterba wrote:
On Wed, May 16, 2018 at 06:03:56PM +0800, Anand Jain wrote:
Not yet ready for the integration. As I need to introduce
-o no_read_mirror_policy instead of -o read_mirror_policy=-
Mount option is mostly likely not the right interface for setting
On 05/16/2018 07:25 PM, Austin S. Hemmelgarn wrote:
On 2018-05-15 22:51, Anand Jain wrote:
Add a kernel log when the balance ends, either for cancel or completed
or if it is paused.
---
v1->v2: Moved from 2/3 to 3/3
fs/btrfs/volumes.c | 7 +++
1 file changed, 7 insertions(+)
d
On 05/16/2018 01:37 AM, Liu Bo wrote:
If a btree block, aka. extent buffer, is not available in the extent
buffer cache, it'll be read out from the disk instead, i.e.
btrfs_search_slot()
read_block_for_search() # hold parent and its lock, go to read child
btrfs_release_path()
On 05/16/2018 03:57 PM, Nikolay Borisov wrote:
On 16.05.2018 05:51, Anand Jain wrote:
Balance args info is an important information to be reviewed for the
system audit. So this patch adds it to the kernel log.
Example:
-> btrfs bal start -dprofiles='raid1|single',convert=raid5
-mprofi
Test to make sure that a raid1 device with missed write reads
good data when reassembled.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
This test case fails as of now.
I am sending this to btrfs ML only as it depends on the
read_mirror_policy kernel patches which is in the ML.
Adds an ability to change the read_mirror_policy at remount.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/super.c | 19 ---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 7ddecf4178a6..e70592036b95
Not yet ready for the integration. As I need to introduce
-o no_read_mirror_policy instead of -o read_mirror_policy=-
to reset the policy as in 3/3. But I am sending this early so that
we can use it for btrfs/161 in the ML, and this patch-set is stable
enough for the testing.
Anand Jain (3
.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
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 21eff0ac1e4f..7ddecf4178a6 100644
--- a/fs
$pid policy configurable from the mount option.
For example..
mount -o read_mirror_policy=pid (which is also default)
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/ctree.h | 2 ++
fs/btrfs/super.c | 10 ++
fs/btrfs/volumes.c | 8 +++-
fs/btrfs/volumes.
Make the uuid_mutex and device_list_mutex comments inline with
the changes.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v1->v2: Fix typo. fs_devs -> fs_uuids
fs/btrfs/volumes.c | 21 +
1 file changed, 9 insertions(+), 12 deletions(-)
diff --gi
On 04/24/2018 11:48 PM, David Sterba wrote:
On Wed, Apr 18, 2018 at 05:56:31PM +0800, Anand Jain wrote:
@@ -155,29 +155,26 @@ static int __btrfs_map_block(struct btrfs_fs_info
*fs_info,
*
* uuid_mutex (global lock)
*
- * protects the fs_uuids list
Add a kernel log when the balance ends, either for cancel or completed
or if it is paused.
---
v1->v2: Moved from 2/3 to 3/3
fs/btrfs/volumes.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index ce68c4f42f94..a4e243a29f5c 100644
---
Kernel logs are very important for the forensic investigations of the
issues in general make it easy to use it. This patch adds 'balance:'
prefix so that it can be easily searched.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v1-v2: Change log update.
fs/btrfs/volumes.
Kernel logs are very important for the forensic investigations of the
issues, these patchs make balance logs easy to review.
Anand Jain (3):
btrfs: balance: prefix kernel logs
btrfs: balance: add args info during start and resume
btrfs: balance: add kernel log for end or paused
fs/btrfs
All comments accepted in v2 in ml, except for the one below.
clear_bit(BTRFS_FS_BALANCE_RUNNING, _info->flags);
if (bargs) {
@@ -3947,10 +4096,8 @@ static int balance_kthread(void *data)
int ret = 0;
mutex_lock(_info->balance_mutex);
- if (fs_info->balance_ctl) {
-
<misono.tomoh...@jp.fujitsu.com>
Reviewed-by: Anand Jain <anand.j...@oracle.com>
--
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
. I am not sure if the function name should prefix with __
here.
Reviewed-by: Anand Jain <anand.j...@orcle.com>
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
the sole caller to avoid
introducing yet-another-pointless forward declaration.
Signed-off-by: Nikolay Borisov <nbori...@suse.com>
Reviewed-by: Anand Jain <anand.j...@oracle.com>
Thanks, Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
On 05/07/2018 11:44 PM, David Sterba wrote:
The fs_info is always available from the context so we don't need to
store it in the structure.
Signed-off-by: David Sterba <dste...@suse.com>
Reviewed-by: Anand Jain <anand.j...@oracle.com>
--
To unsubscribe from this list: s
On 04/19/2018 03:25 PM, Nikolay Borisov wrote:
On 19.04.2018 08:32, Fengguang Wu wrote:
Hello,
FYI this happens in mainline kernel and at least dates back to v4.16 .
It's rather rare error and happens when running xfstests.
Yeah, so this is something which only recently was
On 05/01/2018 01:08 AM, David Sterba wrote:
On Mon, Apr 30, 2018 at 05:49:13PM +0800, Anand Jain wrote:
As flags is a generic name, its often difficult to search, rename
btrfs_balance_control::flags to btrfs_balance_control::b_flags.
I don't think this one is necessary as it's always tied
As flags is a generic name, its often difficult to search, rename
btrfs_balance_control::flags to btrfs_balance_control::b_flags.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/ioctl.c | 10 +-
fs/btrfs/volumes.c | 30 +++---
fs/btrfs/vol
in btrfs_resume_balance_async()
instead of btrfs_recover_balance().
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v1->v2: btrfs_resume_balance_async() can be called only from remount or
mount, we don't need to hold fs_info->balance_lock.
Strictly speaking we should rather keep
On 04/27/2018 02:46 PM, Nikolay Borisov wrote:
On 26.04.2018 11:01, Anand Jain wrote:
Balance args info is an important information to be reviewed on the
system under audit. So this patch adds that.
Would have been good to add example output to the change log.
Here are the samples
ps. So for now..
Reviewed-by: Anand Jain <anand.j...@oracle.com>
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
t; instead of "read-only
filesystem".
Signed-off-by: David Sterba <dste...@suse.com>
Reviewed-by: Anand Jain <anand.j...@oracle.com>
Thanks, Anand
---
- Add missing unlock
fs/btrfs/volumes.c | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git
301 - 400 of 3004 matches
Mail list logo