On 04/26/2018 10:51 PM, Nikolay Borisov wrote:
On 26.04.2018 11:01, Anand Jain wrote:
Kernel logs are very important for the forensic investigations of the
issues in general. This patch adds 'balance:' prefix so that it can be
easily be searched and uses the block group names instead of its
On 04/26/2018 09:01 PM, David Sterba wrote:
On Wed, Apr 25, 2018 at 07:01:41PM +0800, Anand Jain wrote:
Cleanup patches as in the individual change log.
These patches were sent independently as they aren't related as such,
but as I am updating the 1/3 the 2/3 would endup with conflict. So
On 04/26/2018 03:49 PM, Gu Jinxiang wrote:
Since the commit below parameter fs_info in alloc_reloc_control
be no used. So remove it.
commit c6100a4b4e3d ("Btrfs: replace tree->mapping with
tree->private_data")
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
Reviewed-b
Balance args info is an important information to be reviewed on the
system under audit. So this patch adds that.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/volumes.c | 153 +++--
1 file changed, 150 insertions(+), 3 del
Kernel logs are very important for the forensic investigations of the
issues in general. This patch adds 'balance:' prefix so that it can be
easily be searched and uses the block group names instead of its bitmap.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/volumes.
Anand Jain (2):
btrfs: improve balance kernel logs
btrfs: add balance args info during start and resume
fs/btrfs/volumes.c | 185 -
1 file changed, 169 insertions(+), 16 deletions(-)
--
2.7.0
--
To unsubscribe from this list: send
On 04/25/2018 09:16 PM, David Sterba wrote:
On Wed, Apr 25, 2018 at 03:53:29PM +0300, Nikolay Borisov wrote:
Commit ddd93ef3b9d6 ("btrfs: track running balance in a simpler way")
which introduced this bit assigned it number 17. Unfortunately this bit
is already occupied by the
On 04/25/2018 05:45 PM, David Sterba wrote:
On Wed, Apr 25, 2018 at 05:44:13PM +0800, Anand Jain wrote:
Add a new member struct btrfs_raid_attr::raid_name so that
btrfs_raid_array[] can maintain the name of the raid type,
and so we can kill btrfs_raid_type_names[].
Signed-off-by: Anand Jain
Add a new member struct btrfs_raid_attr::bg_flag so that
btrfs_raid_array[] can maintain the bit map flag of the raid type,
and so we can kill btrfs_raid_group[].
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/disk-io.c | 2 +-
fs/btrfs/extent-tree.c | 2 +-
fs
Add a new member struct btrfs_raid_attr::raid_name so that
btrfs_raid_array[] can maintain the name of the raid type,
and so we can kill btrfs_raid_type_names[].
Signed-off-by: Anand Jain <anand.j...@oracle.com>
Reviewed-by: Qu Wenruo <w...@suse.com>
Reviewed-by: Nikolay Bo
-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/volumes.c | 24
fs/btrfs/volumes.h | 2 +-
2 files changed, 9 insertions(+), 17 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index de3eea8b393e..14efa98b7183 100644
--- a/fs/btrfs/volumes.c
+++ b/fs
and 3/3 from its v1.
Anand Jain (3):
btrfs: kill btrfs_raid_type_names[]
btrfs: kill btrfs_raid_group[]
btrfs: kill btrfs_raid_mindev_error[]
fs/btrfs/disk-io.c | 2 +-
fs/btrfs/extent-tree.c | 20 +--
fs/btrfs/volumes.c | 54
-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/volumes.c | 24
fs/btrfs/volumes.h | 2 +-
2 files changed, 9 insertions(+), 17 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index de3eea8b393e..14efa98b7183 100644
--- a/fs/btrfs/volumes.c
+++ b/fs
Add a new member struct btrfs_raid_attr::bg_flag so that
btrfs_raid_array[] can maintain the bit map flag of the raid type,
and so we can kill btrfs_raid_group[].
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/disk-io.c | 2 +-
fs/btrfs/extent-tree.c | 2 +-
fs
Add a new member struct btrfs_raid_attr::raid_name so that
btrfs_raid_array[] can maintain the name of the raid type,
and so we can kill btrfs_raid_type_names[].
Signed-off-by: Anand Jain <anand.j...@oracle.com>
Reviewed-by: Qu Wenruo <w...@suse.com>
Reviewed-by: Nikolay Bo
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
index ef220d541d4b..2acd32ce1573 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -342,6 +342,7 @@ struct btrfs_raid_attr {
int tolerated_failures; /* max tolerated fail devs */
int devs_increment; /* ndevs
Add a new member struct btrfs_raid_attr::raid_name so that
btrfs_raid_array[] can maintain the name of the raid type,
and so we can kill btrfs_raid_type_names[].
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/extent-tree.c | 18 --
fs/btrfs/volumes.c
On 04/21/2018 10:43 AM, Qu Wenruo wrote:
On 2018年04月21日 10:38, Anand Jain wrote:
On 04/20/2018 11:15 PM, David Sterba wrote:
On Fri, Apr 20, 2018 at 10:32:03PM +0800, Anand Jain wrote:
On 04/19/2018 05:38 PM, Qu Wenruo wrote:
Although we have already checked incompat flags manually
On 04/20/2018 11:15 PM, David Sterba wrote:
On Fri, Apr 20, 2018 at 10:32:03PM +0800, Anand Jain wrote:
On 04/19/2018 05:38 PM, Qu Wenruo wrote:
Although we have already checked incompat flags manually before really
mounting it, we could still enhance btrfs_check_super_valid() to check
@@ -3563,6 +3565,12 @@ int write_all_supers(struct btrfs_fs_info *fs_info, int
max_mirrors)
sb = fs_info->super_for_commit;
dev_item = >dev_item;
+ if (btrfs_check_super_valid(fs_info, sb, -1)) {
+ btrfs_err(fs_info,
+ "superblock corruption
On 04/19/2018 05:38 PM, Qu Wenruo wrote:
Although we have already checked incompat flags manually before really
mounting it, we could still enhance btrfs_check_super_valid() to check
incompat flags for later write time super block validation check.
This patch adds such incompat flags check
Ok not that simple, the running status is checked outside of
balance_mutex and there's one more assertion that does not expect the
balance_ctl to exist:
@@ -4031,16 +4032,16 @@ int btrfs_pause_balance(struct btrfs_fs_info *fs_info)
return -ENOTCONN;
}
-
in btrfs_resume_balance_async()
instead of btrfs_recover_balance().
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/volumes.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 66d2ed96aef1..9c29fdca9075
or ro->rw remount. In the former
case, no other user of the balance_ctl exists, in the latter, balance
cannot run until the ro/rw transition is finished.
Signed-off-by: David Sterba <dste...@suse.com>
Reviewed-by: Anand Jain <anand.j...@oracle.com>
Thanks, Anand
--
To unsubscribe
ste...@suse.com>
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
On 04/20/2018 12:33 AM, David Sterba wrote:
Balance cannot be started on a read-only filesystem and will have to
finish/exit before eg. going to read-only via remount.
It can be paused as well.
btrfs balance pause /btrfs && mount -o remount,ro /dev/sdb /btrfs
@@ -4053,15 +4053,20 @@
-by: David Sterba <dste...@suse.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
On 04/20/2018 12:33 AM, David Sterba wrote:
Currently fs_info::balance_running is 0 or 1 and does not use the
semantics of atomics. The pause and cancel check for 0, that can happen
only after __btrfs_balance exits for whatever reason.
Parallel calls to balance ioctl may enter
document that the paused balance starts here and owns the exclusive
op status.
Signed-off-by: David Sterba <dste...@suse.com>
Reviewed-by: Anand Jain <anand.j...@oracle.com>
Thanks, Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body
will be informed. Resolving that
manually should be possible by waiting for the other operation to finish
or cancel the paused state.
Signed-off-by: David Sterba <dste...@suse.com>
Reviewed-by: Anand Jain <anand.j...@oracle.com>
Thanks, Anand
--
To unsubscribe from this list: s
On 04/20/2018 12:33 AM, David Sterba wrote:
Make the clearning visible in the callers so we can pair it with the
test_and_set part.
Signed-off-by: David Sterba <dste...@suse.com>
Reviewed-by: Anand Jain <anand.j...@oracle.com>
Thanks, Anand
---
fs/btrfs/ioctl.c | 2 +
On 04/20/2018 02:22 PM, Gu, Jinxiang wrote:
Hi,
I reproduced this using kernel v4.17-rc1.
It is not always happens.( occurred times/test times: 1/20)
Though it was reported here, its not related to this patch set.
Instead its about the send receive.
Pls post it as a separate thread so it
Use common helper functions where needed. By doing this it improves
code readability and debugging of it.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
tests/btrfs/011 | 197 ++--
1 file changed, 63 insertions(+), 134 deletions(-)
Make the uuid_mutex and device_list_mutex comments inline with
the changes.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
Hi David,
Can you kindly add this patch to the set: 'Review uuid_mutex usage'
Thanks, Anand
fs/btrfs/volumes.c | 21 +
1 file chan
From: Anand Jain <anand.j...@oracle.com>
btrfs inspect dump-tree picks the disk with the largest generation
to read the root tree by scanning for the required devices by default.
But in 2 or more disks RAID1/5/6 you may need to know what's in the
disks individually, so this option --
Adds comments about BTRFS_FS_EXCL_OP to existing comments
about the device locks.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v1->v2: add more clarity to the comments added.
fs/btrfs/volumes.c | 32
1 file changed, 32 insertions(+)
diff -
This test case takes a long time to complete at the default
LOAD_FACTOR=1, so reduce the nr_extents to 256, so for larger
systems it can still use higher LOAD_FACTOR.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
tests/btrfs/130 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
going into $seqres.full.
[1]
ba23855cdc8961bbaef1fcad4854d494cdb3afd3
btrfs-progs: send: use splice syscall instead of read/write to transfer buffer
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
tests/btrfs/130 | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/btrfs/130 b/
On 04/17/2018 05:58 PM, Qu Wenruo wrote:
On 2018年04月17日 17:05, Anand Jain wrote:
v3:
Update commit message to show the corruption in details.
Modify the kernel error message to show corruption is detected before
transaction commitment.
Nice. Thanks. more below.
@@ -3310,6
v3:
Update commit message to show the corruption in details.
Modify the kernel error message to show corruption is detected before
transaction commitment.
Nice. Thanks. more below.
@@ -3310,6 +3311,27 @@ static int write_dev_supers(struct btrfs_device *device,
On 04/16/2018 10:02 AM, Qu Wenruo wrote:
There are already 2 reports about strangely corrupted super blocks,
where csum type and incompat flags get some obvious garbage, but csum
still matches and all other vitals are correct.
This normally means some kernel memory corruption happens,
Adds comments about BTRFS_FS_EXCL_OP to existing comments
about the device locks.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/volumes.c | 16
1 file changed, 16 insertions(+)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 3a3912
On 04/04/2018 02:34 AM, David Sterba wrote:
Balance cannot be started on a read-only filesystem and will have to
finish/exit before eg. going to read-only via remount. Cancelling does
not need to check for that.
In case the filesystem is forcibly set to read-only after an error,
balance will
On 04/04/2018 02:34 AM, David Sterba wrote:
Replace a WARN_ON with a proper check and message in case something goes
really wrong and resumed balance cannot set up its exclusive status.
The check is a user friendly assertion, I don't expect to ever happen
under normal circumstances.
Also
+# Test if the superblock corruption is handled correctly:
+# - Test fsid miss-match (csum ok) between primary and copy superblock
+# Fixed by the ML patch:
+# btrfs: check if the fsid in the primary sb and copy sb are same
+# - Test if the mount fails if the primary
@@ -4569,8 +4560,10 @@ static long btrfs_ioctl_balance(struct file *file, void
__user *arg)
/* this is either (2) or (3) */
if (!atomic_read(_info->balance_running)) {
mutex_unlock(_info->balance_mutex);
- if
diff --git a/cmds-inspect-dump-tree.c b/cmds-inspect-dump-tree.c
index df44bb635c9c..d2676ce55af7 100644
--- a/cmds-inspect-dump-tree.c
+++ b/cmds-inspect-dump-tree.c
@@ -198,6 +198,7 @@ const char * const cmd_inspect_dump_tree_usage[] = {
"-u|--uuid print only the uuid
if it's beyond the
blockcount.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v1->v2: zero only the magic of the alien superblock, instead of whole of
superblock. And comments updated. Thanks.
utils.c | 36
1 file changed, 36 insertions
On 04/10/2018 10:48 PM, David Sterba wrote:
On Fri, Mar 30, 2018 at 08:09:16AM +0800, Anand Jain wrote:
v3->v4:
Update changelog and signoff.
Reintroduce explicit check for '-EUCLEAN'
at Patch 2/8 and 5/8.
v2->v3:
Squash
4/8 btrfs: make btrfs_check_super_csum() non
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>
---
fs/btrfs/vol
Instead of de-referencing the device->fs_devices use cur_devices
which points to the same fs_devices.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/volumes.c | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/
Move uuid_mutex closer to the exclusion section.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
Reviewed-by: David Sterba <dste...@suse.com>
---
fs/btrfs/volumes.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/vol
find_device() declares struct list_head *head pointer and used only once,
instead just use it directly.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/volumes.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
-by: Anand Jain <anand.j...@oracle.com>
---
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 85948ef12ecf..dfebf8f29916 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1115,7 +1115,7
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.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/volumes.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs
Delete the uuid_mutex lock here as this thread access the
btrfs_fs_devices::devices only. And the device_list_mutex lock is already
in place.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/volumes.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/btrfs/volumes.
__btrfs_open_devices() declares struct list_head *head, however head is
used only once, instead use btrfs_fs_devices::devices directly.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/volumes.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs
This function uses fs_info::fs_devices number of time, however we declare
and use it only at the end, instead do it in the beginning of the function
and use it.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/volumes.c | 13 ++---
1 file changed, 6 insertions
btrfs_fs_devices::list is the list of BTRFS fsid in the kernel, a generic
name 'list' makes it's search very difficult, rename it to fs_list.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/sysfs.c | 2 +-
fs/btrfs/volumes.c | 16
fs/btrfs/volumes.h | 2
btrfs_dev_replace_finish() updates devices (soruce and target) which
are within the btrfs_fs_devices::devices or withint the cloned seed
devices (btrfs_fs_devices::seed::devices), so we don't need the global
uuid_mutex.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/dev-rep
read_chunk_tree() calls read_one_dev(), but for seed device we have
to search the fs_uuids list, so we need the uuid_mutex. Add a comment
comment, so that we can improve this part.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/volumes.c | 4
1 file changed, 4 inse
__btrfs_close_devices() is un-exported, drop the __ prefix and rename it
to close_fs_devices().
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/volumes.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
__btrfs_open_devices() is un-exported drop __ prefix and rename it to
open_fs_devices().
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/volumes.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index ef8578
Declare a local btrfs_fs_devices pointer to access the same, as there are
more than one access to the pointer.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/volumes.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs
that they are
inconsistent.
Anand Jain (15):
btrfs: optimize move uuid_mutex closer to the critical section
btrfs: rename struct btrfs_fs_devices::list
btrfs: cleanup __btrfs_open_devices() drop head pointer
btrfs: rename __btrfs_close_devices to close_fs_devices
btrfs: rename __btrfs_open_devices
On 04/04/2018 02:34 AM, David Sterba wrote:
The helper is quite simple and I'd like to see the locking in the
caller.
Signed-off-by: David Sterba <dste...@suse.com>
For the version at:
git://github.com/kdave/btrfs-devel dev/remove-volume-mutex
Reviewed-by: Anand Jain &l
is not held here to protect device lookup, but in
this case device replace cannot run in parallel with device removal (due
to exclusive op protection), so we don't need further locking here.
Signed-off-by: David Sterba <dste...@suse.com>
Reviewed-by: Anand Jain <anand.j...@oracle.com
. >
Signed-off-by: David Sterba <dste...@suse.com>
Thanks for cleaning volume_mutex.
Reviewed-by: Anand Jain <anand.j...@oracle.com>
Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kern
On 04/09/2018 07:53 PM, David Sterba wrote:
On Mon, Apr 09, 2018 at 04:39:03PM +0800, Anand Jain wrote:
On 04/04/2018 02:34 AM, David Sterba wrote:
The volume mutex does not protect against anything in this case, the
comment about scrub is right but not related to locking and looks
On 04/09/2018 04:54 PM, Nikolay Borisov wrote:
On 9.04.2018 11:39, Anand Jain wrote:
On 04/04/2018 02:34 AM, David Sterba wrote:
The volume mutex does not protect against anything in this case, the
comment about scrub is right but not related to locking and looks
confusing. The comment
On 04/04/2018 02:34 AM, David Sterba wrote:
The volume mutex does not protect against anything in this case, the
comment about scrub is right but not related to locking and looks
confusing. The comment in btrfs_find_device_missing_or_by_path is wrong
and confusing too.
The device_list_mutex
-by: David Sterba <dste...@suse.com>
Reviewed-by: Anand Jain <anand.j...@oracle.com>
A nitpick below.
---
fs/btrfs/ioctl.c | 8
fs/btrfs/volumes.c | 27 ---
2 files changed, 16 insertions(+), 19 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/b
umount).
+*/
+ if (test_and_set_bit(BTRFS_FS_EXCL_OP, _info->flags)) {
+ btrfs_err(fs_info,
+ "cannot set exclusive op status to resume balance");
+ return -EINVAL;
+ }
+
Reviewed-by: Anand Jain <anand.j...@oracle.com>
Than
Verify if the superblock corruption is handled correctly.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v2->v3:
Provide the disk to be corrupted as an arg, instead of swapping the devices,
so drop mount_opt_minus_args().
159.out slightly changed.
v1->v2:
$subject slig
+mount_opt_minus_args()
+{
+ local nr
+ local mnt_opt=""
+
+ nr=`_scratch_mount_options | awk '{print NF}'`
+ if [ $nr -eq 4 ]; then
Seems this only works with "scratch_mount_options" returns something
like:
"-o opt dev mnt" or "-o opt1,opt2 dev mnt"
but not
"-oopt
On 04/07/2018 02:42 PM, Anand Jain wrote:
On 04/04/2018 02:34 AM, David Sterba wrote:
The device replace is paused by unmount or read only remount, and
resumed on next mount or write remount.
The exclusive status should be checked properly as it's a global
invariant and we must not allow 2
On 04/04/2018 02:34 AM, David Sterba wrote:
The device replace is paused by unmount or read only remount, and
resumed on next mount or write remount.
The exclusive status should be checked properly as it's a global
invariant and we must not allow 2 operations run. In this case, the
balance
First superblock is zero-ed and its not some random corruption,
most probably someone else other than btrfs used the disk when
it was unmounted? Or if the partition (if any) was changed? or
if its a SAN storge hope the LUN wasn't recreated at the storage end.
Thanks, Anand
On 04/07/2018
@@ -3926,11 +3925,11 @@ int btrfs_balance(struct btrfs_balance_control *bctl,
return ret;
out:
if (bctl->flags & BTRFS_BALANCE_RESUME)
- __cancel_balance(fs_info);
- else {
+ reset_balance_state(fs_info);
reset_balance_state() is something
ex);
clear_bit(BTRFS_FS_EXCL_OP, _info->flags);
out_drop_write:
mnt_drop_write_file(file);
Why not memdup_user() be outside of volume_mutex?
But not a big deal either.
Reviewed-by: Anand Jain <anand.j...@oracle.com>
Thanks, Anand
--
To unsubscribe from this list: send th
On 04/04/2018 02:34 AM, David Sterba wrote:
The function logically belongs there and there's only a single caller,
no need to export it. No code changes.
Signed-off-by: David Sterba <dste...@suse.com>
Reviewed-by: Anand Jain <anand.j...@oracle.com>
Thanks, Anand
--
To unsu
On 04/04/2018 02:34 AM, David Sterba wrote:
The function will be used outside of volumes.c, the allocation
btrfs_alloc_device is also exported.
Signed-off-by: David Sterba <dste...@suse.com>
Reviewed-by: Anand Jain <anand.j...@oracle.com>
Thanks, Anand
--
To unsubscribe fr
<dste...@suse.com>
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
On 04/04/2018 02:34 AM, David Sterba wrote:
The function is called once and is fairly small, we can merge it with
the caller.
Signed-off-by: David Sterba <dste...@suse.com>
Reviewed-by: Anand Jain <anand.j...@oracle.com>
Thanks, Anand
--
To unsubscribe from this list: s
maintain the UIDs/GIDs of the
user that built the files rather than be owned by root.
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
Mor
Verify if the superblock corruption is handled correctly.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
v1->v2:
$subject slightly changed
Added more info about the test-case
Keep the stuff from the ./new btrfs
Add mount_opt_minus_args() to get the options (if) set at the co
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+status=1 # failure is the default!
Please use './new btrfs' to generate new test template, which defines
variables like 'tmp' and 'here', these variables may not be used in the
test explicitly, but they
We check the %csum_type twice. Drop one. Check for the csum_type and
then for the csum. Which also matches with the progs which have better
logic. This is preparatory patch to get proper error code from
btrfs_check_super_csum().
Signed-off-by: Anand Jain <anand.j...@oracle.com>
Re
of= seek=274877906944 ibs=1 obs=1 count4K
OR apply the btrfs-progs patch
btrfs-progs: wipe copies of the stale superblock beyond -b size
which shall find and wipe the non overwriting superblock during mkfs.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
Reviewed-by: Nikolay Borisov <nbori...
fs_scan_one_device(ioctl-arg-dev only)
|_btrfs_read_disk_super()
|_read_cache_page_gfp()
Anand Jain (7):
btrfs: cleanup btrfs_check_super_csum() for better code flow
btrfs: return required error from btrfs_check_super_csum
btrfs: cleanup btrfs_read_disk_super() to return std error
btrfs: check if t
Return the required -EINVAL and -EUCLEAN from the function
btrfs_check_super_csum(). And more the error log into the
parent function.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
Reviewed-by: Nikolay Borisov <nbori...@suse.com>
---
v2->v4:
Check for -EUCLEAN in else if
v1-&
The only caller btrfs_scan_one_device() sets -EINVAL for error from
btrfs_read_disk_super(), so this patch returns -EINVAL from the latter
function.
A preparatory patch to add csum check in btrfs_read_disk_super().
Signed-off-by: Anand Jain <anand.j...@oracle.com>
Reviewed-by: Nikolay B
@@ -2570,9 +2568,14 @@ int open_ctree(struct super_block *sb,
* We want to check superblock checksum, the type is stored inside.
* Pass the whole disk block of size BTRFS_SUPER_INFO_SIZE (4k).
*/
- if (btrfs_check_super_csum(fs_info, bh->b_data)) {
-
for the dmesg for errors.
mkfs.btrfs -fq /dev/sdc
dd if=/dev/urandom of=/dev/sdc ibs=1 obs=1 count=1 seek=67108864
btrfs dev scan /dev/sdc
mount /dev/sdc /btrfs
Signed-off-by: Anand Jain <anand.j...@oracle.com>
Reviewed-by: Nikolay Borisov <nbori...@suse.com>
---
v3->v4:
Upda
if it's beyond the
blockcount.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
utils.c | 35 +++
1 file changed, 35 insertions(+)
diff --git a/utils.c b/utils.c
index e9cb3a82fda6..6a9408b06e73 100644
--- a/utils.c
+++ b/utils.c
@@ -365,6 +365,41
one_super(latest_bdev only)
|___bread(latest_bdev)
Signed-off-by: Anand Jain <anand.j...@oracle.com>
---
fs/btrfs/disk-io.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 1eabcc4bf8d2..55b8a57435a9 100644
--- a/fs/btrfs/disk-io.c
+++
for the dmesg for errors.
mkfs.btrfs -fq /dev/sdc
dd if=/dev/urandom of=/dev/sdc ibs=1 obs=1 count=1 seek=67108864
btrfs dev scan /dev/sdc
mount /dev/sdc /btrfs
Signed-off-by: Anand Jain <anand.j...@oracle.com>
v3->v2:
Also squash 4/8 in here.
4/8: btrfs: make btrfs_check_super_c
ock, by
using the btrfs-progs cli.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
Reviewed-by: Nikolay Borisov <nbori...@suse.com>
v1->v2:
git commit log update. With the call-chain (which I believe will
go away in the long term, we need the uuid from the userland not
the disk-p
Return the required -EINVAL and -EUCLEAN from the function
btrfs_check_super_csum(). And more the error log into the
parent function.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
v1->v2:
Fix commit indent reported by checkpatch.pl
Fix pr_err split string
---
fs/btrfs/disk-
of= seek=274877906944 ibs=1 obs=1 count4K
OR apply the btrfs-progs patch
btrfs-progs: wipe copies of the stale superblock beyond -b size
which shall find and wipe the non overwriting superblock during mkfs.
Signed-off-by: Anand Jain <anand.j...@oracle.com>
v1->v2:
Do an explicit read fo
401 - 500 of 3004 matches
Mail list logo