Re: [PATCH] Remove unused dedupe argument btrfs_set_extent_delalloc()

2017-10-10 Thread Qu Wenruo
On 2017年10月11日 10:29, Goldwyn Rodrigues wrote: From: Goldwyn Rodrigues Signed-off-by: Goldwyn Rodrigues --- fs/btrfs/ctree.h | 2 +- fs/btrfs/file.c | 2 +- fs/btrfs/inode.c | 9 -

[PATCH v3 1/4] btrfs: add_missing_dev() should return the actual error

2017-10-10 Thread Anand Jain
add_missing_dev() can return device pointer so that IS_ERR/ PTR_ERR can be used to check for the actual error occurred in the function. Signed-off-by: Anand Jain Reviewed-by: Liu Bo --- v2: add btrfs_err in read_one_dev too v3: fix wrong commit id

Re: [PATCH] Remove unused dedupe argument btrfs_set_extent_delalloc()

2017-10-10 Thread Tsutomu Itoh
On 2017/10/11 11:29, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues > 'int dedupe' was added to prepare for support of subpage sector size and in-band dedupe. commit ba8b04c1d4ad ("btrfs: extend btrfs_set_extent_delalloc and its friends to support in-band dedupe and

[PATCH v2.1 1/4] btrfs: add_missing_dev() should return the actual error

2017-10-10 Thread Anand Jain
add_missing_dev() can return device pointer so that IS_ERR/ PTR_ERR can be used to check for the actual error occurred in the function. Signed-off-by: Anand Jain Reviewed-by: Liu Bo --- fs/btrfs/volumes.c | 17 - 1 file changed, 12

Re: USB upgrade fun

2017-10-10 Thread Kai Hendry
On Tue, 10 Oct 2017, at 10:06 AM, Satoru Takeuchi wrote: > Probably `btrfs device remove missing /mnt/raid1` works. That command worked. Took a really long time, but it worked. However when I unmounted /mnt/raid1 and tried mounting it again, it fails! :(

[PATCH] Remove unused dedupe argument btrfs_set_extent_delalloc()

2017-10-10 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Signed-off-by: Goldwyn Rodrigues --- fs/btrfs/ctree.h | 2 +- fs/btrfs/file.c | 2 +- fs/btrfs/inode.c | 9 - fs/btrfs/relocation.c| 2 +- fs/btrfs/tests/inode-tests.c | 12

[PATCH] btrfs: cleanup extent locking sequence

2017-10-10 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Code cleanup for better understanding: needs_unlock to be called extent_locked to show state as opposed to action. Changed the variable to int, to reduce code in the critical path(code usually executed). Signed-off-by: Goldwyn Rodrigues

[PATCH v2 3/3] btrfs-progs: device: add remove missing-all

2017-10-10 Thread Misono, Tomohiro
Add 'btrfs remove missing-all' to remove all the missing devices at once for improving usability. Example: sudo mkfs.btrfs -f -d raid1 /dev/sdb1 /dev/sdb2 /dev/sdb3 /dev/sdb4 sudo wipefs -a /dev/sdb1 /dev/sdb3 sudo mount -o degraded /dev/sdb2 /mnt sudo btrfs filesystem show /mnt sudo btrfs

[PATCH v2 2/3] btrfs-progs: doc: add description of missing and example of device remove

2017-10-10 Thread Misono, Tomohiro
This patch updates help/document of "btrfs device remove" in two points: 1. Add explanation of 'missing' for 'device remove'. This is only written in wikipage currently. (https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices) 2. Add example of device removal in the man

[PATCH v2 1/3] btrfs-progs: device: add description of alias to help message

2017-10-10 Thread Misono, Tomohiro
State the 'delete' is the alias of 'remove' as the man page says. Signed-off-by: Tomohiro Misono Reviewed-by: Satoru Takeuchi --- cmds-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds-device.c

[PATCH v2 0/3] btrfs-progs: device: update btrfs device remove missing

2017-10-10 Thread Misono, Tomohiro
This series updates "btrfs device remove missing". Currently, the document lacks the description of "remove missing" which is written only in wikipage. First and second patch updates the documents. Third patch introduces new keyword "missing-all" to remove the all missing devices at once for

Re: [PATCH] btrfs-progs: doc: update help/document of btrfs device remove

2017-10-10 Thread Misono, Tomohiro
On 2017/10/11 6:22, Satoru Takeuchi wrote: > At Tue, 3 Oct 2017 17:12:39 +0900, > Misono, Tomohiro wrote: >> >> This patch updates help/document of "btrfs device remove" in two points: >> >> 1. Add explanation of 'missing' for 'device remove'. This is only >> written in wikipage currently. >>

[PATCH v2] btrfs: Use bd_dev to generate index when dev_state_hashtable add items.

2017-10-10 Thread Gu Jinxiang
From: Gu JinXiang Fix bug of (). Description of this bug: Use MOUNT_OPTIONS="-o check_int" when run xfstest, device can not be mount successfully. So xfstest can not run. Signed-off-by: Gu JinXiang --- fs/btrfs/check-integrity.c | 2 +- 1 file

[PATCH] Btrfs-progs: do not add stale device into fs_devices

2017-10-10 Thread Liu Bo
If one of btrfs's devices was pulled out and we've replaced it with a new one, then they have the same uuid. If that device gets reconnected, 'btrfs filesystem show' will show the stale one instead of the new one, but on kernel side btrfs has a fix to not include the stale one, this could confuse

Re: [PATCH v2 1/4] btrfs: add_missing_dev() should return the actual error

2017-10-10 Thread Liu Bo
On Mon, Oct 09, 2017 at 11:07:43AM +0800, Anand Jain wrote: > add_missing_dev() can return device pointer so that IS_ERR/ > PTR_ERR can be used to check for the actual error occurred > in the function. > > Signed-off-by: Anand Jain > --- > v2: This patch is a split from >

Re: [PATCH 2/4] btrfs-progs: fsck: Introduce --fix-dev-size option

2017-10-10 Thread Qu Wenruo
On 2017年10月10日 21:16, David Sterba wrote: On Tue, Oct 10, 2017 at 07:51:11AM +, Qu Wenruo wrote: Introduce --fix-dev-size option to fix device related problems. Please don't add it to 'check', this is not the right place for the targeted fixes. -> 'btrfs rescue' I'm OK moving the

[PATCH] Btrfs: remove rcu_barrier in btrfs_close_devices

2017-10-10 Thread Liu Bo
It was introduced because btrfs used to do blkdev_put in a deferred work, now that btrfs has put blkdev in place, this rcu_barrier can be removed. Signed-off-by: Liu Bo --- fs/btrfs/volumes.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/fs/btrfs/volumes.c

[PATCH] Btrfs: free btrfs_device in place

2017-10-10 Thread Liu Bo
It's pointless to defer it to a kthread helper as we're not under any special context. Signed-off-by: Liu Bo --- fs/btrfs/volumes.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index

Re: [PATCH] btrfs-progs: doc: update help/document of btrfs device remove

2017-10-10 Thread Satoru Takeuchi
At Tue, 3 Oct 2017 17:12:39 +0900, Misono, Tomohiro wrote: > > This patch updates help/document of "btrfs device remove" in two points: > > 1. Add explanation of 'missing' for 'device remove'. This is only > written in wikipage currently. >

[PATCH v2] Btrfs: avoid losing data raid profile when deleting a device

2017-10-10 Thread Liu Bo
We've avoided data losing raid profile when doing balance, but it turns out that deleting a device could also result in the same problem. This fixes the problem by creating an empty data chunk before relocating the data chunk. Metadata/System chunk are supposed to have non-zero bytes all the

Re: [PATCH v2 5/5] btrfs: ensure that metadata and flush are issued from the root cgroup

2017-10-10 Thread Liu Bo
On Tue, Oct 10, 2017 at 09:43:26AM -0700, Tejun Heo wrote: > From 3bbed8c7747739cda48f592f165e8839da076a3a Mon Sep 17 00:00:00 2001 > > Issuing metdata or otherwise shared IOs from !root cgroup can lead to > priority inversion. This patch ensures that those IOs are always > issued from the root

Re: [PATCH] Btrfs: avoid losing data raid profile when deleting a device

2017-10-10 Thread Liu Bo
On Tue, Oct 10, 2017 at 09:57:46AM +0300, Nikolay Borisov wrote: > > > On 9.10.2017 21:01, Liu Bo wrote: > > We've avoided data losing raid profile when doing balance, but it > > turns out that deleting a device could also result in the same > > problem. > > > > This fixes the problem by

Re: [PATCH] btrfs: fix max chunk size on dup

2017-10-10 Thread Hans van Kranenburg
Sorry for the mail spam, it's an interesting code puzzle... :) On 10/10/2017 07:22 PM, Hans van Kranenburg wrote: > On 10/10/2017 07:07 PM, Hans van Kranenburg wrote: >> On 10/10/2017 01:31 PM, David Sterba wrote: >>> Hi, >>> >>> On Fri, Sep 29, 2017 at 04:20:51PM +0900, Naohiro Aota wrote:

Re: [PATCH 1/4] Btrfs: compress_file_range() remove dead variable num_bytes

2017-10-10 Thread David Sterba
On Tue, Oct 03, 2017 at 06:06:01PM +0300, Timofey Titovets wrote: > Remove dead assigment of num_bytes > > Also as num_bytes only used in will_compress block as > copy of total_in just replace that with total_in and drop num_bytes entire > > Signed-off-by: Timofey Titovets

Re: [PATCH 4/4] Btrfs: btrfs_dedupe_file_range() ioctl, remove 16MiB restriction

2017-10-10 Thread David Sterba
On Tue, Oct 03, 2017 at 06:06:04PM +0300, Timofey Titovets wrote: > At now btrfs_dedupe_file_range() restricted to 16MiB range for > limit locking time and memory requirement for dedup ioctl() > > For too big input rage code silently set range to 16MiB > > Let's remove that restriction by do

Re: [PATCH] btrfs: fix max chunk size on dup

2017-10-10 Thread Hans van Kranenburg
On 10/10/2017 07:07 PM, Hans van Kranenburg wrote: > On 10/10/2017 01:31 PM, David Sterba wrote: >> Hi, >> >> On Fri, Sep 29, 2017 at 04:20:51PM +0900, Naohiro Aota wrote: >>> Balancing a fresh METADATA=dup btrfs file system (with size < 50G) >>> generates a 128MB sized block group. While we set

Re: [PATCH] btrfs: fix max chunk size on dup

2017-10-10 Thread Hans van Kranenburg
On 10/10/2017 01:31 PM, David Sterba wrote: > Hi, > > On Fri, Sep 29, 2017 at 04:20:51PM +0900, Naohiro Aota wrote: >> Balancing a fresh METADATA=dup btrfs file system (with size < 50G) >> generates a 128MB sized block group. While we set max_stripe_size = >> max_chunk_size = 256MB, we get this

[PATCH v2 5/5] btrfs: ensure that metadata and flush are issued from the root cgroup

2017-10-10 Thread Tejun Heo
>From 3bbed8c7747739cda48f592f165e8839da076a3a Mon Sep 17 00:00:00 2001 Issuing metdata or otherwise shared IOs from !root cgroup can lead to priority inversion. This patch ensures that those IOs are always issued from the root cgroup. This patch updates btrfs_update_iflags() to not set

Re: [PATCH 3/4] Btrfs: handle unaligned tail of data ranges more efficient

2017-10-10 Thread David Sterba
On Tue, Oct 03, 2017 at 06:06:03PM +0300, Timofey Titovets wrote: > At now while switch page bits in data ranges > we always hande +1 page, for cover case > where end of data range is not page aligned The 'end' is inclusive and thus not aligned in most cases, ie. it's offset 4095 in the page, so

Re: [PATCH 2/4] Btrfs: clear_dirty only on pages only in compression range

2017-10-10 Thread David Sterba
On Tue, Oct 03, 2017 at 06:06:02PM +0300, Timofey Titovets wrote: > We need to call extent_range_clear_dirty_for_io() > on compression range to prevent application from changing > page content, while pages compressing. > > but "(end - start)" can be much (up to 1024 times) bigger > then

[PATCHSET v2] cgroup, writeback, btrfs: make sure btrfs issues metadata IOs from the root cgroup

2017-10-10 Thread Tejun Heo
Hello, Changes from the last version are * blkcg_root_css exported to fix build breakage on modular btrfs. * Use ext4_should_journal_data() test instead of EXT4_MOUNT_JOURNAL_DATA. * Separated out create_bh_bio() and used it to implement submit_bh_blkcg_css() as suggested by Jan. btrfs

[PATCH 3/5] buffer_head: separate out create_bh_bio() from submit_bh_wbc()

2017-10-10 Thread Tejun Heo
submit_bh_wbc() creates a bio matching the specific @bh and submits it at the end. This patch separates out the bio creation part to its own function, create_bh_bio(), and reimplement submit_bh[_wbc]() using the function. As bio can now be manipulated before submitted, we can move out @wbc

[PATCH 2/5] cgroup, writeback: replace SB_I_CGROUPWB with per-inode S_CGROUPWB

2017-10-10 Thread Tejun Heo
Currently, filesystem can indiate cgroup writeback support per superblock; however, depending on the filesystem, especially if inodes are used to carry metadata, it can be useful to indicate cgroup writeback support per inode. This patch replaces the superblock flag SB_I_CGROUPWB with per-inode

[PATCH 4/5] cgroup, buffer_head: implement submit_bh_blkcg_css()

2017-10-10 Thread Tejun Heo
Implement submit_bh_blkcg_css() which will be used to override cgroup membership on specific buffer_heads. v2: Reimplemented using create_bh_bio() as suggested by Jan. Signed-off-by: Tejun Heo Cc: Jan Kara Cc: Jens Axboe --- fs/buffer.c

[PATCH 5/5] btrfs: ensure that metadata and flush are issued from the root cgroup

2017-10-10 Thread Tejun Heo
Issuing metdata or otherwise shared IOs from !root cgroup can lead to priority inversion. This patch ensures that those IOs are always issued from the root cgroup. This patch updates btrfs_update_iflags() to not set S_CGROUPWB on btree_inodes. This isn't strictly necessary as those inodes don't

[PATCH 1/5] blkcg: export blkcg_root_css

2017-10-10 Thread Tejun Heo
Export blkcg_root_css so that filesystem modules can use it. Signed-off-by: Tejun Heo --- block/blk-cgroup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index d3f56ba..597a457 100644 --- a/block/blk-cgroup.c +++

Re: [PATCH] btrfs: use appropriate replacements for __sb_{start,end}_write calls

2017-10-10 Thread David Sterba
On Tue, Oct 10, 2017 at 01:48:05PM +0300, Rakesh Pandit wrote: > Commit a53f4f8e9c8eb ("btrfs: Don't call btrfs_start_transaction() on > frozen fs to avoid deadlock.") started using internal calls and we > replace them with more suitable ones. > > Signed-off-by: Rakesh Pandit

Re: [PATCH 2/4] btrfs-progs: fsck: Introduce --fix-dev-size option

2017-10-10 Thread David Sterba
On Tue, Oct 10, 2017 at 07:51:11AM +, Qu Wenruo wrote: > Introduce --fix-dev-size option to fix device related problems. Please don't add it to 'check', this is not the right place for the targeted fixes. -> 'btrfs rescue' > This repairing is also included in --repair, but considering the

Re: [PATCH] btrfs: use appropriate replacements for __sb_{start,end}_write calls

2017-10-10 Thread Rakesh Pandit
On Tue, Oct 10, 2017 at 02:08:11PM +0300, Nikolay Borisov wrote: > > > On 10.10.2017 13:48, Rakesh Pandit wrote: > > Commit a53f4f8e9c8eb ("btrfs: Don't call btrfs_start_transaction() on > > frozen fs to avoid deadlock.") started using internal calls and we > > replace them with more suitable

Re: [PATCH] btrfs: Use bd_dev to generate index when dev_state_hashtable add items.

2017-10-10 Thread David Sterba
On Mon, Oct 09, 2017 at 01:54:14AM +, Gu, Jinxiang wrote: > Hi, > sorry for reply too late. > > This patch fix for the bug descriped below. > Use MOUNT_OPTIONS="-o check_int" when run xfstest, device > Can not be mount successfully. So xfstest can not run. So please update the changelog and

Re: [PATCH] btrfs: fix max chunk size on dup

2017-10-10 Thread David Sterba
Hi, On Fri, Sep 29, 2017 at 04:20:51PM +0900, Naohiro Aota wrote: > Balancing a fresh METADATA=dup btrfs file system (with size < 50G) > generates a 128MB sized block group. While we set max_stripe_size = > max_chunk_size = 256MB, we get this half sized block group: > > $ btrfs ins dump-t -t

Re: [PATCH] btrfs: use appropriate replacements for __sb_{start,end}_write calls

2017-10-10 Thread Rakesh Pandit
On Tue, Oct 10, 2017 at 02:00:20PM +0300, Nikolay Borisov wrote: > > > On 10.10.2017 13:48, Rakesh Pandit wrote: > > Commit a53f4f8e9c8eb ("btrfs: Don't call btrfs_start_transaction() on > > frozen fs to avoid deadlock.") started using internal calls and we > > replace them with more suitable

Re: [PATCH] btrfs: use appropriate replacements for __sb_{start,end}_write calls

2017-10-10 Thread Nikolay Borisov
On 10.10.2017 13:48, Rakesh Pandit wrote: > Commit a53f4f8e9c8eb ("btrfs: Don't call btrfs_start_transaction() on > frozen fs to avoid deadlock.") started using internal calls and we > replace them with more suitable ones. > > Signed-off-by: Rakesh Pandit > --- >

Re: [PATCH] btrfs: use appropriate replacements for __sb_{start,end}_write calls

2017-10-10 Thread Nikolay Borisov
On 10.10.2017 13:48, Rakesh Pandit wrote: > Commit a53f4f8e9c8eb ("btrfs: Don't call btrfs_start_transaction() on > frozen fs to avoid deadlock.") started using internal calls and we > replace them with more suitable ones. > > Signed-off-by: Rakesh Pandit > --- >

[PATCH] btrfs: use appropriate replacements for __sb_{start,end}_write calls

2017-10-10 Thread Rakesh Pandit
Commit a53f4f8e9c8eb ("btrfs: Don't call btrfs_start_transaction() on frozen fs to avoid deadlock.") started using internal calls and we replace them with more suitable ones. Signed-off-by: Rakesh Pandit --- fs/btrfs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [PATCH 2/3] cgroup, writeback: implement submit_bh_blkcg_css()

2017-10-10 Thread Jan Kara
On Mon 09-10-17 14:29:10, Tejun Heo wrote: > Add wbc->blkcg_css so that the blkcg_css association can be specified > independently and implement submit_bh_blkcg_css() using it. This will > be used to override cgroup membership on specific buffer_heads. > > Signed-off-by: Tejun Heo

Re: [ANNOUNCE] fsperf: a simple fs/block performance testing framework

2017-10-10 Thread Mel Gorman
On Tue, Oct 10, 2017 at 08:09:20AM +1100, Dave Chinner wrote: > > I'd _like_ to expand fio for cases we come up with that aren't possible, as > > there's already a ton of measurements that are taken, especially around > > latencies. > > To be properly useful it needs to support more than just fio

Re: [PATCH 1/3] cgroup, writeback: replace SB_I_CGROUPWB with per-inode S_CGROUPWB

2017-10-10 Thread Jan Kara
On Mon 09-10-17 14:29:09, Tejun Heo wrote: > Currently, filesystem can indiate cgroup writeback support per > superblock; however, depending on the filesystem, especially if inodes > are used to carry metadata, it can be useful to indicate cgroup > writeback support per inode. > > This patch

Re: [PATCH] btrfs: prefix sysfs attribute struct names

2017-10-10 Thread Hans van Kranenburg
On 10/09/2017 06:17 PM, David Sterba wrote: > On Sun, Oct 08, 2017 at 10:30:58PM +0200, Hans van Kranenburg wrote: >> Currently struct names for sysfs are generated only based on the >> attribute names. This means that attribute names cannot be reused in >> multiple places throughout the complete

[PATCH] btrfs-progs: qgroup: show subvol path when qgroup show

2017-10-10 Thread Lu Fengqi
Show the absolute subvol path for the associated level-0 qgroup. Signed-off-by: Lu Fengqi --- Documentation/btrfs-qgroup.asciidoc | 2 + cmds-qgroup.c | 7 +- qgroup.c| 130 +---

Re: [PATCH 3/4] btrfs-progs: check: Also check unalignment/mismatch device and super size

2017-10-10 Thread Qu Wenruo
On 2017年10月10日 16:31, Nikolay Borisov wrote: On 10.10.2017 10:51, Qu Wenruo wrote: Along with the fix introduced, also introduce check for them. Unlike normal check funtions, some of the check is optional, and even if the image failed to pass optional check, kernel can still run fine. (But

Re: [PATCH 0/4] btrfs-progs repair support for unaligned/mismatched device sizes

2017-10-10 Thread Qu Wenruo
On 2017年10月10日 16:15, Nikolay Borisov wrote: On 10.10.2017 10:51, Qu Wenruo wrote: The patchset can be fetched from github: https://github.com/adam900710/btrfs-progs/tree/check_unaligned_dev There are several reports in mail list for btrfs device size related problems. 1) Unmountable fs,

Re: [PATCH 3/4] btrfs-progs: check: Also check unalignment/mismatch device and super size

2017-10-10 Thread Nikolay Borisov
On 10.10.2017 10:51, Qu Wenruo wrote: > Along with the fix introduced, also introduce check for them. > Unlike normal check funtions, some of the check is optional, and even if > the image failed to pass optional check, kernel can still run fine. > (But may cause noisy kernel warning) > > So

Re: [PATCH 1/4] btrfs-progs: Introduce functions to repair unaligned/mismatch device size

2017-10-10 Thread Nikolay Borisov
On 10.10.2017 10:51, Qu Wenruo wrote: > This patch introduces functions to repair device size related problems, > including: > 1) Unaligned total_bytes of dev_item >v4.14-rc kernel introduced total_bytes alignment checker. >However older kernel device add/shrink doesn't align these

Re: [PATCH 0/4] btrfs-progs repair support for unaligned/mismatched device sizes

2017-10-10 Thread Nikolay Borisov
On 10.10.2017 10:51, Qu Wenruo wrote: > The patchset can be fetched from github: > https://github.com/adam900710/btrfs-progs/tree/check_unaligned_dev > > There are several reports in mail list for btrfs device size related > problems. > > 1) Unmountable fs, due to mismatched super total_bytes

[PATCH 0/4] btrfs-progs repair support for unaligned/mismatched device sizes

2017-10-10 Thread Qu Wenruo
The patchset can be fetched from github: https://github.com/adam900710/btrfs-progs/tree/check_unaligned_dev There are several reports in mail list for btrfs device size related problems. 1) Unmountable fs, due to mismatched super total_bytes Unmountable if super total_bytes is smaller than

[PATCH 2/4] btrfs-progs: fsck: Introduce --fix-dev-size option

2017-10-10 Thread Qu Wenruo
Introduce --fix-dev-size option to fix device related problems. This repairing is also included in --repair, but considering the safety and potential affected users, it's better to provide a option to fix and only fix device size related problem to avoid full --repair. Reported-by: Asif

[PATCH 4/4] btrfs-progs: test/fsck: Add test case image for --fix-dev-size

2017-10-10 Thread Qu Wenruo
The image has 2 problems mixed: 1) Too small super total_bytes This super total_bytes is manually modified to create such problem. 2) Unaligned dev item total_bytes This is created by v4.12 kernel, with 128M + 2K device added, and original device removed. Then we can create such

[PATCH 3/4] btrfs-progs: check: Also check unalignment/mismatch device and super size

2017-10-10 Thread Qu Wenruo
Along with the fix introduced, also introduce check for them. Unlike normal check funtions, some of the check is optional, and even if the image failed to pass optional check, kernel can still run fine. (But may cause noisy kernel warning) So some check, mainly for alignment, will not cause btrfs

[PATCH 1/4] btrfs-progs: Introduce functions to repair unaligned/mismatch device size

2017-10-10 Thread Qu Wenruo
This patch introduces functions to repair device size related problems, including: 1) Unaligned total_bytes of dev_item v4.14-rc kernel introduced total_bytes alignment checker. However older kernel device add/shrink doesn't align these members. This will cause kernel warning every time

Re: [PATCH v3] btrfs-progs: RAID5: Inject data stripe corruption and verify scrub fixes it and retains correct parity.

2017-10-10 Thread Lakshmipathi.G
Any review comments on this RAID5 test script? I understand it depends on 'dump-tree' output, but I assume, right now, we have no other choice other than this method. I'll modify this patch to reflect coding practices as mentioned in tests/README.md, if current method is okay. Cheers.

Re: WARNING: ... at fs/btrfs/ctree.h:1559 btrfs_update_device+0x1be/0x1d0 [btrfs]

2017-10-10 Thread Nikolay Borisov
On 9.10.2017 20:26, Cloud Admin wrote: > Hi, > I update kernel from 4.11.10 to 4.13.4 and since that I get the following > message in the kernel journal calling 'scrub' or 'balance'. I use Fedora 26 > with btrfs-progs v4.9.1. > What does this mean and (more important) what can I do? > Bye >

Re: [PATCH] Btrfs: avoid losing data raid profile when deleting a device

2017-10-10 Thread Nikolay Borisov
On 9.10.2017 21:01, Liu Bo wrote: > We've avoided data losing raid profile when doing balance, but it > turns out that deleting a device could also result in the same > problem. > > This fixes the problem by creating an empty data chunk before > relocating the data chunk. > > Metadata/System