Price Inquiry

2018-11-11 Thread Daniel Murray
Hi,friend, This is Daniel Murray and i am from Sinara Group Co.Ltd Group Co.,LTD in Russia. We are glad to know about your company from the web and we are interested in your products. Could you kindly send us your Latest catalog and price list for our trial order. Best Regards, Daniel

Re: [PATCH V6] Btrfs: enhance raid1/10 balance heuristic

2018-11-11 Thread Timofey Titovets
Gentle ping. вт, 25 сент. 2018 г. в 21:38, Timofey Titovets : > > Currently btrfs raid1/10 balancer bаlance requests to mirrors, > based on pid % num of mirrors. > > Make logic understood: > - if one of underline devices are non rotational > - Queue length to underline devices > > By default try

Re: [PATCH 0/7] fstests: test Btrfs swapfile support

2018-11-11 Thread Eryu Guan
On Tue, Nov 06, 2018 at 02:06:30PM +0100, David Sterba wrote: > On Mon, Nov 05, 2018 at 12:09:31AM +0800, Eryu Guan wrote: > > On Fri, Nov 02, 2018 at 02:29:35PM -0700, Omar Sandoval wrote: > > > From: Omar Sandoval > > > > > > This series fixes a couple of generic swapfile tests and adds some >

[PATCH 9/9] btrfs: add explicit check for replace result no error

2018-11-11 Thread Anand Jain
We recast the replace return status BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS to 0, to indicate no error. And since BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR should also return 0, which is also declared as 0, so we just return. Instead add it to the if statement so that there is enough clarity

[PATCH 5/9] btrfs: replace cancel is successful if scrub cancel is successful

2018-11-11 Thread Anand Jain
In btrfs_dev_replace_cancel() we should check if the btrfs_scrub_cancel() is successful. If the btrfs_scrub_cancel() fails, return BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED so that user can try to cancel the replace again. Signed-off-by: Anand Jain --- fs/btrfs/dev-replace.c | 22

[PATCH 6/9] btrfs: replace's scrub must not be running in replace suspended state

2018-11-11 Thread Anand Jain
When the replace state is placed in the suspended state, btrfs_scrub_cancel() should fail with -ENOTCONN as there is no scrub running, as a safety catch check if btrfs_scrub_cancel() returns -ENOTCONN and assert if it doesn't. Signed-off-by: Anand Jain --- fs/btrfs/dev-replace.c | 4 +++- 1

[PATCH 7/9] btrfs: quiten warn if the replace is canceled at finish

2018-11-11 Thread Anand Jain
When we successfully cancel the replace its scrub returns -ECANCELED, which then passed to btrfs_dev_replace_finishing(), it cleans up based on the scrub returned status and propagates the same -ECANCELED back the parent function. As of now only user can cancel the replace-scrub, so its ok to

[PATCH 8/9] btrfs: user requsted replace cancel is not an error

2018-11-11 Thread Anand Jain
As of now only user requested replace cancel can cancel the replace-scrub so no need to log error for it. Signed-off-by: Anand Jain --- fs/btrfs/dev-replace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index

[PATCH 3/9] btrfs: replace back to suspend state if EXCL OP is running

2018-11-11 Thread Anand Jain
In a secnario where balance and replace co-exists as below, start balance; pause balance; start replace; reboot and when system restarts balance restarts first and the replace restart will fail as EXCL OP lock is already held by the balance. If so place the replace state back to

[PATCH 2/9] btrfs: replace go back to suspended if target missing

2018-11-11 Thread Anand Jain
At the time of forced unmount we place the running replace to BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED state, so when the system comes back and suppose the target device is missing, then let the replace state continue to be in BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED state instead of

[PATCH 1/9] btrfs: mark btrfs_dev_replace_start() as static

2018-11-11 Thread Anand Jain
There isn't any other consumer other than in its own file dev-replace.c. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov --- fs/btrfs/dev-replace.c | 2 +- fs/btrfs/dev-replace.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/btrfs/dev-replace.c

[PATCH 0/9 v2] fix replace-start and replace-cancel racing

2018-11-11 Thread Anand Jain
v1->v2: 2/9: Drop writeback required 3/9: Drop writeback required 7/9: Use the condition within the WARN_ON() 6/9: Use the condition within the ASSERT() Replace-start and replace-cancel threads can race to create a messy situation leading to UAF. We use the scrub code to write the blocks

[PATCH 4/9] btrfs: fix UAF due to race between replace start and cancel

2018-11-11 Thread Anand Jain
replace cancel thread can race with the replace start thread and if fs_info::scrubs_running is not yet set the btrfs_scrub_cancel() will fail to stop the scrub thread, so the scrub thread continue with the scrub for replace which then shall try to write to the target device and which is already

Re: [PATCH 2/9] btrfs: replace go back to suspended if target missing

2018-11-11 Thread Anand Jain
On 11/07/2018 08:35 PM, Nikolay Borisov wrote: On 7.11.18 г. 13:43 ч., Anand Jain wrote: At the time of forced unmount we place the running replace to BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED state, so when the system comes back and suppose the target device is missing, then let the replace

Re: [PATCH] btrfs: Check for missing device before bio submission in btrfs_map_bio

2018-11-10 Thread Anand Jain
On 11/08/2018 10:16 PM, Nikolay Borisov wrote: Before btrfs_map_bio submits all stripe bio it does a number of checks to ensure the device for every stripe is present. However, it doesn't do a DEV_STATE_MISSING check, instead this is relegated to the lower level btrfs_schedule_bio (in the

Re: [PATCH v15.1 00/13] Btrfs In-band De-duplication

2018-11-09 Thread Anand Jain
De-duplication must also let use cases to enable de-duplication on per subvolume level, using the subvolume properties. Similar to compression and future-encryption. Thanks, Anand

Re: [PATCH v9 0/6] Btrfs: implement swap file support

2018-11-09 Thread Omar Sandoval
On Wed, Nov 07, 2018 at 04:28:10PM +0100, David Sterba wrote: > On Wed, Nov 07, 2018 at 05:07:00PM +0200, Nikolay Borisov wrote: > > > > > > On 7.11.18 г. 16:49 ч., David Sterba wrote: > > > On Tue, Nov 06, 2018 at 10:54:51AM +0100, David Sterba wrote: > > >> On Thu, Sep 27, 2018 at 11:17:32AM

Re: [PATCH v2] Btrfs: fix missing delayed iputs on unmount

2018-11-09 Thread Omar Sandoval
On Wed, Nov 07, 2018 at 05:01:19PM +0100, David Sterba wrote: > On Wed, Oct 31, 2018 at 10:06:08AM -0700, Omar Sandoval wrote: > > From: Omar Sandoval > > > > There's a race between close_ctree() and cleaner_kthread(). > > close_ctree() sets btrfs_fs_closing(), and the cleaner stops when it > >

Re: [Regression bisected] btrfs: always wait on ordered extents at fsync time

2018-11-09 Thread Mel Gorman
On Fri, Nov 09, 2018 at 09:51:48PM +, Mel Gorman wrote: > Unfortunately, as > I'm about to travel, I didn't attempt a revert and a test comparing 4.18, > 4.19 and 4.20-rc1 is a few hours away so this could potentially be fixed > already but I didn't spot any obvious Fixes commit. > Still

lening aanvragen

2018-11-09 Thread Funding Trusts Finance
-- Groet, groet aan jou, GELD BESCHIKBAAR VOOR LENING. Krijg het geld / de lening die u nodig hebt bij Funding Trusts Finance. Wij zijn particuliere kredietverstrekkers / investeerders en bieden zowel persoonlijke leningen, startleningen, educatieve / agrarische leningen, onroerend goed /

[Regression bisected] btrfs: always wait on ordered extents at fsync time

2018-11-09 Thread Mel Gorman
Hi Josef (and review/signed-off path), I noticed a particularly large regression when reviewing results from v4.18 to v4.18 (33.81% regression with 5 reaim clients). An automatic bisection resolved to commit b5e6c3e170b7 ("btrfs: always wait on ordered extents at fsync time"). I won't pretend to

Re: [PATCH v15.1 04/13] btrfs: dedupe: Introduce function to remove hash from in-memory tree

2018-11-09 Thread Josef Bacik
On Tue, Nov 06, 2018 at 02:41:13PM +0800, Lu Fengqi wrote: > From: Wang Xiaoguang > > Introduce static function inmem_del() to remove hash from in-memory > dedupe tree. > And implement btrfs_dedupe_del() and btrfs_dedup_disable() interfaces. > > Also for btrfs_dedupe_disable(), add new

Re: [PATCH v15.1 01/13] btrfs: dedupe: Introduce dedupe framework and its header

2018-11-09 Thread Josef Bacik
On Tue, Nov 06, 2018 at 02:41:10PM +0800, Lu Fengqi wrote: > From: Wang Xiaoguang > > Introduce the header for btrfs in-band(write time) de-duplication > framework and needed header. > > The new de-duplication framework is going to support 2 different dedupe > methods and 1 dedupe hash. > >

Re: [PATCH] btrfs: Check for missing device before bio submission in btrfs_map_bio

2018-11-09 Thread Josef Bacik
On Thu, Nov 08, 2018 at 04:16:38PM +0200, Nikolay Borisov wrote: > Before btrfs_map_bio submits all stripe bio it does a number of checks > to ensure the device for every stripe is present. However, it doesn't > do a DEV_STATE_MISSING check, instead this is relegated to the lower > level

Re: [PATCH] Btrfs: simpler and more efficient cleanup of a log tree's extent io tree

2018-11-09 Thread Josef Bacik
On Fri, Nov 09, 2018 at 10:43:08AM +, fdman...@kernel.org wrote: > From: Filipe Manana > > We currently are in a loop finding each range (corresponding to a btree > node/leaf) in a log root's extent io tree and then clean it up. This is a > waste of time since we are traversing the extent io

Re: unable to mount btrfs after upgrading from 4.16.1 to 4.19.1

2018-11-09 Thread Tomasz Chmielewski
On 2018-11-10 04:20, Tomasz Chmielewski wrote: On 2018-11-10 04:15, Tomasz Chmielewski wrote: On 2018-11-10 03:20, Roman Mamedov wrote: On Sat, 10 Nov 2018 03:08:01 +0900 Tomasz Chmielewski wrote: After upgrading from kernel 4.16.1 to 4.19.1 and a clean restart, the fs no longer mounts:

Re: unable to mount btrfs after upgrading from 4.16.1 to 4.19.1

2018-11-09 Thread Tomasz Chmielewski
On 2018-11-10 04:15, Tomasz Chmielewski wrote: On 2018-11-10 03:20, Roman Mamedov wrote: On Sat, 10 Nov 2018 03:08:01 +0900 Tomasz Chmielewski wrote: After upgrading from kernel 4.16.1 to 4.19.1 and a clean restart, the fs no longer mounts: Did you try rebooting back to 4.16.1 to see if

Re: unable to mount btrfs after upgrading from 4.16.1 to 4.19.1

2018-11-09 Thread Tomasz Chmielewski
On 2018-11-10 03:20, Roman Mamedov wrote: On Sat, 10 Nov 2018 03:08:01 +0900 Tomasz Chmielewski wrote: After upgrading from kernel 4.16.1 to 4.19.1 and a clean restart, the fs no longer mounts: Did you try rebooting back to 4.16.1 to see if it still mounts there? Yes, just did.

Re: unable to mount btrfs after upgrading from 4.16.1 to 4.19.1

2018-11-09 Thread Roman Mamedov
On Sat, 10 Nov 2018 03:08:01 +0900 Tomasz Chmielewski wrote: > After upgrading from kernel 4.16.1 to 4.19.1 and a clean restart, the fs > no longer mounts: Did you try rebooting back to 4.16.1 to see if it still mounts there? -- With respect, Roman

unable to mount btrfs after upgrading from 4.16.1 to 4.19.1

2018-11-09 Thread Tomasz Chmielewski
btrfs sits on md RAID-5: /dev/md2 /data btrfs noatime,compress-force=zstd,space_cache=v2,noauto 0 0 After upgrading from kernel 4.16.1 to 4.19.1 and a clean restart, the fs no longer mounts: # mount /data mount: wrong fs type, bad option, bad superblock on /dev/md2, missing

Re: Full filesystem btrfs rebalance kernel panic to read-only lock

2018-11-09 Thread Pieter Maes
Op 09-11-18 om 02:21 schreef Qu Wenruo: > > On 2018/11/9 上午6:40, Pieter Maes wrote: >> Hello, >> [Snip] > Btrfs-progs could do it with some extra dirty work. > (I purposed offline device resize idea, but didn't implement it yet) > > You could use this branch: >

Re: [PATCHv2 0/9] Removal of optionsl extent_io_ops callbacks

2018-11-09 Thread Nikolay Borisov
On 9.11.18 г. 16:08 ч., Nikolay Borisov wrote: > Here is the 2nd revision of the extent_io_ops optinal callbacks removal. What > prompted this version was that I identified a flaw in the initial version - > while > it did check for the presence of an inode in extent_io_tree::private_data, i

[PATCH 8/9] btrfs: Remove extent_io_ops::merge_extent_hook callback

2018-11-09 Thread Nikolay Borisov
This callback is used only for data and free space inodes. Such inodes are guaranteed to have their extent_io_tree::private_data set to the inode struct. Exploit this fact to directly call the function. Also give it a more descriptive name. No functional changes. Reviewed-by: Josef Bacik

[PATCH 6/9] btrfs: Remove extent_io_ops::set_bit_hook extent_io callback

2018-11-09 Thread Nikolay Borisov
This callback is used to properly account delalloc extents for data inodes (ordinary file inodes and freespace v1 inodes). Those can be easily identified since they have their extent_io trees ->private_data member point to the inode. Let's exploit this fact to remove the needless indirection

[PATCH 9/9] btrfs: Remove extent_io_ops::split_extent_hook callback

2018-11-09 Thread Nikolay Borisov
This is the counterpart to merge_extent_hook, similarly, it's used only for data/freespace inodes so let's remove it, rename it and call it directly where necessary. No functional changes. Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David

[PATCH 5/9] btrfs: Remove extent_io_ops::check_extent_io_range callback

2018-11-09 Thread Nikolay Borisov
This callback was only used in debug builds by btrfs_leak_debug_check. A better approach is to move its implementation in btrfs_leak_debug_check and ensure the latter is only executed for extent tree which have ->private_data set i.e. relate to a data node and not the btree one. No functional

[PATCH 3/9] btrfs: Remove extent_io_ops::writepage_start_hook

2018-11-09 Thread Nikolay Borisov
This hook is called only from __extent_writepage_io which is already called only from the data page writeout path. So there is no need to make an indirect call via extent_io_ops. This patch just removes the callback definition, exports the callback function and calls it directly at the only call

[PATCH 2/9] btrfs: Remove extent_io_ops::fill_delalloc

2018-11-09 Thread Nikolay Borisov
This callback is called only from writepage_delalloc which in turn is guaranteed to be called from the data page writeout path. In the end there is no reason to have the call to this function to be indrected via the extent_io_ops structure. This patch removes the callback definition, exports the

[PATCH 4/9] btrfs: Remove extent_io_ops::writepage_end_io_hook

2018-11-09 Thread Nikolay Borisov
This callback is ony ever called for data page writeout so there is no need to actually abstract it via extent_io_ops. Lets just export it, remove the definition of the callback and call it directly in the functions that invoke the callback. Also rename the function to

[PATCH 1/9] btrfs: Add function to distinguish between data and btree inode

2018-11-09 Thread Nikolay Borisov
This will be used in future patches that remove the optional extent_io_ops callbacks. Signed-off-by: Nikolay Borisov --- fs/btrfs/btrfs_inode.h | 5 + 1 file changed, 5 insertions(+) diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 97d91e55b70a..213a6a63dac5 100644 ---

[PATCHv2 0/9] Removal of optionsl extent_io_ops callbacks

2018-11-09 Thread Nikolay Borisov
Here is the 2nd revision of the extent_io_ops optinal callbacks removal. What prompted this version was that I identified a flaw in the initial version - while it did check for the presence of an inode in extent_io_tree::private_data, i forgot to explicitly check the ino to be different than

[PATCH 7/9] btrfs: Remove extent_io_ops::clear_bit_hook callback

2018-11-09 Thread Nikolay Borisov
This is the counterpart to ex-set_bit_hook (now btrfs_set_delalloc_extent), similar to what was done before remove clear_bit_hook and rename the function. No functional changes. Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba ---

Re: [PATCH] Btrfs: do not set log for full commit when creating non-data block groups

2018-11-09 Thread Qu Wenruo
On 2018/11/9 下午6:21, Filipe Manana wrote: > On Fri, Nov 9, 2018 at 12:27 AM Qu Wenruo wrote: >> >> >> >> On 2018/11/8 下午10:48, Filipe Manana wrote: >>> On Thu, Nov 8, 2018 at 2:37 PM Filipe Manana wrote: On Thu, Nov 8, 2018 at 2:35 PM Qu Wenruo wrote: > > > > On

Re: [PATCH] Btrfs: simpler and more efficient cleanup of a log tree's extent io tree

2018-11-09 Thread Nikolay Borisov
On 9.11.18 г. 12:43 ч., fdman...@kernel.org wrote: > From: Filipe Manana > > We currently are in a loop finding each range (corresponding to a btree > node/leaf) in a log root's extent io tree and then clean it up. This is a > waste of time since we are traversing the extent io tree's rb_tree

[PATCH] Btrfs: simpler and more efficient cleanup of a log tree's extent io tree

2018-11-09 Thread fdmanana
From: Filipe Manana We currently are in a loop finding each range (corresponding to a btree node/leaf) in a log root's extent io tree and then clean it up. This is a waste of time since we are traversing the extent io tree's rb_tree more times then needed (one for a range lookup and another for

Re: [PATCH] Btrfs: do not set log for full commit when creating non-data block groups

2018-11-09 Thread Filipe Manana
On Fri, Nov 9, 2018 at 12:27 AM Qu Wenruo wrote: > > > > On 2018/11/8 下午10:48, Filipe Manana wrote: > > On Thu, Nov 8, 2018 at 2:37 PM Filipe Manana wrote: > >> > >> On Thu, Nov 8, 2018 at 2:35 PM Qu Wenruo wrote: > >>> > >>> > >>> > >>> On 2018/11/8 下午9:17, fdman...@kernel.org wrote: >

Re: [PATCH] Btrfs: incremental send, fix infinite loop when apply children dir moves

2018-11-09 Thread Filipe Manana
On Fri, Nov 9, 2018 at 1:21 AM robbieko wrote: > > robbieko 於 2018-11-06 20:23 寫到: > > Hi, > > > > I can reproduce the infinite loop, the following will describe the > > reason and example. > > > > Example: > > tree --inodes parent/ send/ > > parent/ > > `-- [261] 261 > > `-- [271]

Re: Full filesystem btrfs rebalance kernel panic to read-only lock

2018-11-08 Thread Qu Wenruo
On 2018/11/9 上午6:40, Pieter Maes wrote: > Hello, > > So, I've had the full disk issue, so when I tried re-balancing, > I got a panic, that pushed filesystem read-only and I'm unable to > balance or grow the filesystem now. > > fs info: > btrfs fi show / > Label: none  uuid:

Re: [PATCH] Btrfs: incremental send, fix infinite loop when apply children dir moves

2018-11-08 Thread robbieko
robbieko 於 2018-11-06 20:23 寫到: Hi, I can reproduce the infinite loop, the following will describe the reason and example. Example: tree --inodes parent/ send/ parent/ `-- [261] 261 `-- [271] 271 `-- [266] 266 |-- [259] 259 |-- [260]

Re: [PATCH] Btrfs: do not set log for full commit when creating non-data block groups

2018-11-08 Thread Qu Wenruo
On 2018/11/8 下午10:48, Filipe Manana wrote: > On Thu, Nov 8, 2018 at 2:37 PM Filipe Manana wrote: >> >> On Thu, Nov 8, 2018 at 2:35 PM Qu Wenruo wrote: >>> >>> >>> >>> On 2018/11/8 下午9:17, fdman...@kernel.org wrote: From: Filipe Manana When creating a block group we don't need

Full filesystem btrfs rebalance kernel panic to read-only lock

2018-11-08 Thread Pieter Maes
Hello, So, I've had the full disk issue, so when I tried re-balancing, I got a panic, that pushed filesystem read-only and I'm unable to balance or grow the filesystem now. fs info: btrfs fi show / Label: none  uuid: 9b591b6b-6040-437e-9398-6883ca3bf1bb     Total devices 1 FS bytes used

Re: [PATCH v15.1 03/13] btrfs: dedupe: Introduce function to add hash into in-memory tree

2018-11-08 Thread Timofey Titovets
вт, 6 нояб. 2018 г. в 9:41, Lu Fengqi : > > From: Wang Xiaoguang > > Introduce static function inmem_add() to add hash into in-memory tree. > And now we can implement the btrfs_dedupe_add() interface. > > Signed-off-by: Qu Wenruo > Signed-off-by: Wang Xiaoguang > Reviewed-by: Josef Bacik >

Re: Where is my disk space ?

2018-11-08 Thread Chris Murphy
On Thu, Nov 8, 2018 at 2:27 AM, Barbet Alain wrote: > Hi ! > Just to give you end of the story: > I move my /var/lib/docker to my home (other partition), and my space > come back ... I'm not sure why that would matter. Both btrfs du and regular du showed only ~350M used in /var which is about

Re: [PATCH] Btrfs: do not set log for full commit when creating non-data block groups

2018-11-08 Thread Filipe Manana
On Thu, Nov 8, 2018 at 2:37 PM Filipe Manana wrote: > > On Thu, Nov 8, 2018 at 2:35 PM Qu Wenruo wrote: > > > > > > > > On 2018/11/8 下午9:17, fdman...@kernel.org wrote: > > > From: Filipe Manana > > > > > > When creating a block group we don't need to set the log for full commit > > > if the new

Re: [PATCH] Btrfs: do not set log for full commit when creating non-data block groups

2018-11-08 Thread Filipe Manana
On Thu, Nov 8, 2018 at 2:35 PM Qu Wenruo wrote: > > > > On 2018/11/8 下午9:17, fdman...@kernel.org wrote: > > From: Filipe Manana > > > > When creating a block group we don't need to set the log for full commit > > if the new block group is not used for data. Logged items can only point > > to

Re: [PATCH] Btrfs: do not set log for full commit when creating non-data block groups

2018-11-08 Thread Qu Wenruo
On 2018/11/8 下午9:17, fdman...@kernel.org wrote: > From: Filipe Manana > > When creating a block group we don't need to set the log for full commit > if the new block group is not used for data. Logged items can only point > to logical addresses of data block groups (through file extent items)

[PATCH] btrfs: Check for missing device before bio submission in btrfs_map_bio

2018-11-08 Thread Nikolay Borisov
Before btrfs_map_bio submits all stripe bio it does a number of checks to ensure the device for every stripe is present. However, it doesn't do a DEV_STATE_MISSING check, instead this is relegated to the lower level btrfs_schedule_bio (in the async submission case, sync submission doesn't check

[PATCH] Btrfs: do not set log for full commit when creating non-data block groups

2018-11-08 Thread fdmanana
From: Filipe Manana When creating a block group we don't need to set the log for full commit if the new block group is not used for data. Logged items can only point to logical addresses of data block groups (through file extent items) so there is no need to for the next fsync to fallback to a

Re: [PATCH v15.1 02/13] btrfs: dedupe: Introduce function to initialize dedupe info

2018-11-08 Thread Timofey Titovets
вт, 6 нояб. 2018 г. в 9:41, Lu Fengqi : > > From: Wang Xiaoguang > > Add generic function to initialize dedupe info. > > Signed-off-by: Qu Wenruo > Signed-off-by: Wang Xiaoguang > Reviewed-by: Josef Bacik > Signed-off-by: Lu Fengqi > --- > fs/btrfs/Makefile | 2 +- >

Re: [PATCH -next] btrfs: remove set but not used variable 'tree'

2018-11-08 Thread David Sterba
On Thu, Nov 08, 2018 at 02:14:43AM +, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > fs/btrfs/extent_io.c: In function 'end_extent_writepage': > fs/btrfs/extent_io.c:2406:25: warning: > variable 'tree' set but not used [-Wunused-but-set-variable] > > It not used any

Re: [PATCH v15.1 01/13] btrfs: dedupe: Introduce dedupe framework and its header

2018-11-08 Thread Timofey Titovets
вт, 6 нояб. 2018 г. в 9:41, Lu Fengqi : > > From: Wang Xiaoguang > > Introduce the header for btrfs in-band(write time) de-duplication > framework and needed header. > > The new de-duplication framework is going to support 2 different dedupe > methods and 1 dedupe hash. > > Signed-off-by: Qu

Re: Where is my disk space ?

2018-11-08 Thread Barbet Alain
Hi ! Just to give you end of the story: I move my /var/lib/docker to my home (other partition), and my space come back ... I let docker here & don't try to put it again on / to see if problem come back. Le mer. 31 oct. 2018 à 08:34, Barbet Alain a écrit : > > > Also, since you don't have any

Re: [PATCH 6/9] btrfs: replace's scrub must not be running in replace suspended state

2018-11-08 Thread Anand Jain
On 11/08/2018 04:52 PM, Nikolay Borisov wrote: On 8.11.18 г. 10:33 ч., Anand Jain wrote: On 11/07/2018 08:19 PM, Nikolay Borisov wrote: On 7.11.18 г. 13:43 ч., Anand Jain wrote: +    /* scrub for replace must not be running in suspended state */ +    if

Re: [PATCH 6/9] btrfs: replace's scrub must not be running in replace suspended state

2018-11-08 Thread Nikolay Borisov
On 8.11.18 г. 10:33 ч., Anand Jain wrote: > > > On 11/07/2018 08:19 PM, Nikolay Borisov wrote: >> >> >> On 7.11.18 г. 13:43 ч., Anand Jain wrote: >>> +    /* scrub for replace must not be running in suspended state */ >>> +    if (btrfs_scrub_cancel(fs_info) != -ENOTCONN) >>> +

Re: [PATCH 6/9] btrfs: replace's scrub must not be running in replace suspended state

2018-11-08 Thread Anand Jain
On 11/07/2018 08:19 PM, Nikolay Borisov wrote: On 7.11.18 г. 13:43 ч., Anand Jain wrote: + /* scrub for replace must not be running in suspended state */ + if (btrfs_scrub_cancel(fs_info) != -ENOTCONN) + ASSERT(0);

[PATCH 0/3] Cleanups following optional extent_io_ops callbacks removal

2018-11-08 Thread Nikolay Borisov
Here are 3 minor patches that further clean up writepage_delalloc. The first one moves the extent locked check in the caller of writepage_delalloc since this seems more natural. This paves the way for the second patch which removes epd as an argument to writepage_delalloc. The final patch was

[PATCH 3/3] btrfs: Remove unused extent_state argument from btrfs_writepage_endio_finish_ordered

2018-11-08 Thread Nikolay Borisov
This parameter was never used, yet was part of the interface of the function ever since its introduction as extent_io_ops::writepage_end_io_hook in e6dcd2dc9c48 ("Btrfs: New data=ordered implementation"). Now that NULL is passed everywhere as a value for this parameter let's remove it for good. No

[PATCH 1/3] btrfs: Move epd::extent_locked check to writepage_delalloc's caller

2018-11-08 Thread Nikolay Borisov
If epd::extent_locked is set then writepage_delalloc terminates. Make this a bit more apparent in the caller by simply bubbling the check up. This enables to remove epd as an argument to writepage_delalloc in a future patch. No functional change. Signed-off-by: Nikolay Borisov ---

[PATCH 2/3] btrfs: Remove extent_page_data argument from writepage_delalloc

2018-11-08 Thread Nikolay Borisov
The only remaining use of the 'epd' argument in writepage_delalloc is to reference the extent_io_tree which was set in extent_writepages. Since it is guaranteed that page->mapping of any page passed to writepage_delalloc (and __extent_writepage as the sole caller) to be equal to that passed in

Re: [PATCH 7/9] btrfs: quiten warn if the replace is canceled at finish

2018-11-08 Thread Anand Jain
On 11/07/2018 08:17 PM, Nikolay Borisov wrote: On 7.11.18 г. 13:43 ч., Anand Jain wrote: - WARN_ON(ret); + if (ret != -ECANCELED) + WARN_ON(ret); WARN_ON(ret && ret != -ECANCELED) Will fix. Thanks, Anand

Re: [PATCH 9/9] btrfs: add explicit check for replace result no error

2018-11-07 Thread Anand Jain
On 11/07/2018 08:15 PM, Nikolay Borisov wrote: On 7.11.18 г. 13:43 ч., Anand Jain wrote: We recast the replace return status BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS to 0, to indicate no error. And since BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR should also return 0, which is also

Re: [PATCH -next] btrfs: compression: remove set but not used variable 'tree'

2018-11-07 Thread Nikolay Borisov
On 8.11.18 г. 4:15 ч., YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > fs/btrfs/compression.c: In function 'end_compressed_bio_write': > fs/btrfs/compression.c:232:25: warning: > variable 'tree' set but not used [-Wunused-but-set-variable] > > It not used any more

Re: [PATCH -next] btrfs: remove set but not used variable 'tree'

2018-11-07 Thread Nikolay Borisov
On 8.11.18 г. 4:14 ч., YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > fs/btrfs/extent_io.c: In function 'end_extent_writepage': > fs/btrfs/extent_io.c:2406:25: warning: > variable 'tree' set but not used [-Wunused-but-set-variable] > > It not used any more after >

[PATCH v2 5/6] btrfs: qgroup: Use delayed subtree rescan for balance

2018-11-07 Thread Qu Wenruo
Before this patch, qgroup code trace the whole subtree of file and reloc trees unconditionally. This makes qgroup numbers consistent, but it could cause tons of unnecessary extent trace, which cause a lot of overhead. However for subtree swap of balance, since both subtree contains the same

[PATCH v2 2/6] btrfs: relocation: Delay reloc tree deletion after merge_reloc_roots()

2018-11-07 Thread Qu Wenruo
Relocation code will drop btrfs_root::reloc_root as soon as merge_reloc_root() finishes. However later qgroup code will need to access btrfs_root::reloc_root after merge_reloc_root() for delayed subtree rescan. So alter the timming of resetting btrfs_root:::reloc_root, make it happens after

[PATCH v2 0/6] btrfs: qgroup: Delay subtree scan to reduce overhead

2018-11-07 Thread Qu Wenruo
This patchset can be fetched from github: https://github.com/adam900710/linux/tree/qgroup_delayed_subtree_rebased Which is based on v4.20-rc1. This patch address the heavy load subtree scan, but delaying it until we're going to modify the swapped tree block. The overall workflow is: 1) Record

[PATCH v2 6/6] btrfs: qgroup: Cleanup old subtree swap code

2018-11-07 Thread Qu Wenruo
Since it's replaced by new delayed subtree swap code, remove the original code. The cleanup is small since most of its core function is still used by delayed subtree swap trace. Signed-off-by: Qu Wenruo --- fs/btrfs/qgroup.c | 94 ---

[PATCH v2 3/6] btrfs: qgroup: Refactor btrfs_qgroup_trace_subtree_swap()

2018-11-07 Thread Qu Wenruo
Refactor btrfs_qgroup_trace_subtree_swap() into qgroup_trace_subtree_swap(), which only needs two extent buffer and some other bool to control the behavior. Also, allow depending functions to accept parameter @exec_post to determine whether we need to trigger backref walk. This provides the

[PATCH v2 4/6] btrfs: qgroup: Introduce per-root swapped blocks infrastructure

2018-11-07 Thread Qu Wenruo
To allow delayed subtree swap rescan, btrfs needs to record per-root info about which tree blocks get swapped. So this patch introduces per-root btrfs_qgroup_swapped_blocks structure, which records which tree blocks get swapped. The designed workflow will be: 1) Record the subtree root block

[PATCH v2 1/6] btrfs: qgroup: Allow btrfs_qgroup_extent_record::old_roots unpopulated at insert time

2018-11-07 Thread Qu Wenruo
Commit fb235dc06fac ("btrfs: qgroup: Move half of the qgroup accounting time out of commit trans") makes btrfs_qgroup_extent_record::old_roots populated at insert time. It's OK for most cases as btrfs_qgroup_extent_record is inserted at delayed ref head insert time, which has a less restrict lock

[PATCH -next] btrfs: compression: remove set but not used variable 'tree'

2018-11-07 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: fs/btrfs/compression.c: In function 'end_compressed_bio_write': fs/btrfs/compression.c:232:25: warning: variable 'tree' set but not used [-Wunused-but-set-variable] It not used any more after commit 2922040236f9 ("btrfs: Remove

[PATCH -next] btrfs: remove set but not used variable 'tree'

2018-11-07 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: fs/btrfs/extent_io.c: In function 'end_extent_writepage': fs/btrfs/extent_io.c:2406:25: warning: variable 'tree' set but not used [-Wunused-but-set-variable] It not used any more after commit 2922040236f9 ("btrfs: Remove

Re: [PATCH] Btrfs: fix data corruption due to cloning of eof block

2018-11-07 Thread Josef Bacik
On Mon, Nov 05, 2018 at 11:14:17AM +, fdman...@kernel.org wrote: > From: Filipe Manana > > We currently allow cloning a range from a file which includes the last > block of the file even if the file's size is not aligned to the block > size. This is fine and useful when the destination file

Re: [PATCH v2] Btrfs: fix missing delayed iputs on unmount

2018-11-07 Thread David Sterba
On Wed, Oct 31, 2018 at 10:06:08AM -0700, Omar Sandoval wrote: > From: Omar Sandoval > > There's a race between close_ctree() and cleaner_kthread(). > close_ctree() sets btrfs_fs_closing(), and the cleaner stops when it > sees it set, but this is racy; the cleaner might have already checked >

Re: [PATCH v9 0/6] Btrfs: implement swap file support

2018-11-07 Thread David Sterba
On Wed, Nov 07, 2018 at 05:07:00PM +0200, Nikolay Borisov wrote: > > > On 7.11.18 г. 16:49 ч., David Sterba wrote: > > On Tue, Nov 06, 2018 at 10:54:51AM +0100, David Sterba wrote: > >> On Thu, Sep 27, 2018 at 11:17:32AM -0700, Omar Sandoval wrote: > >>> From: Omar Sandoval > >>> This series

Re: [PATCH v9 0/6] Btrfs: implement swap file support

2018-11-07 Thread Nikolay Borisov
On 7.11.18 г. 16:49 ч., David Sterba wrote: > On Tue, Nov 06, 2018 at 10:54:51AM +0100, David Sterba wrote: >> On Thu, Sep 27, 2018 at 11:17:32AM -0700, Omar Sandoval wrote: >>> From: Omar Sandoval >>> This series implements swap file support for Btrfs. >>> >>> Changes from v8 [1]: >>> >>> -

Re: [PATCH v9 0/6] Btrfs: implement swap file support

2018-11-07 Thread David Sterba
On Tue, Nov 06, 2018 at 10:54:51AM +0100, David Sterba wrote: > On Thu, Sep 27, 2018 at 11:17:32AM -0700, Omar Sandoval wrote: > > From: Omar Sandoval > > This series implements swap file support for Btrfs. > > > > Changes from v8 [1]: > > > > - Fixed a bug in btrfs_swap_activate() which would

Re: [PATCH 2/9] btrfs: replace go back to suspended if target missing

2018-11-07 Thread Nikolay Borisov
On 7.11.18 г. 13:43 ч., Anand Jain wrote: > At the time of forced unmount we place the running replace to > BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED state, so when the system comes > back and suppose the target device is missing, then let the replace > state continue to be in

Re: [PATCH 5/9] btrfs: replace cancel is successful if scrub cancel is successful

2018-11-07 Thread Nikolay Borisov
On 7.11.18 г. 14:25 ч., Nikolay Borisov wrote: > > > On 7.11.18 г. 13:43 ч., Anand Jain wrote: >> In btrfs_dev_replace_cancel() we should check if the >> btrfs_scrub_cancel() is successful. If the btrfs_scrub_cancel() fails, return >> BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED so that user

Re: [PATCH 5/9] btrfs: replace cancel is successful if scrub cancel is successful

2018-11-07 Thread Nikolay Borisov
On 7.11.18 г. 13:43 ч., Anand Jain wrote: > In btrfs_dev_replace_cancel() we should check if the > btrfs_scrub_cancel() is successful. If the btrfs_scrub_cancel() fails, return > BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED so that user can try to > cancel the replace again. > > Signed-off-by:

Re: [PATCH 6/9] btrfs: replace's scrub must not be running in replace suspended state

2018-11-07 Thread Nikolay Borisov
On 7.11.18 г. 13:43 ч., Anand Jain wrote: > + /* scrub for replace must not be running in suspended state */ > + if (btrfs_scrub_cancel(fs_info) != -ENOTCONN) > + ASSERT(0); ASSERT(btrfs_scrub_cancel(fs_info) == -ENOTCONN)

Re: [PATCH 7/9] btrfs: quiten warn if the replace is canceled at finish

2018-11-07 Thread Nikolay Borisov
On 7.11.18 г. 13:43 ч., Anand Jain wrote: > - WARN_ON(ret); > + if (ret != -ECANCELED) > + WARN_ON(ret); WARN_ON(ret && ret != -ECANCELED)

Re: [PATCH 9/9] btrfs: add explicit check for replace result no error

2018-11-07 Thread Nikolay Borisov
On 7.11.18 г. 13:43 ч., Anand Jain wrote: > We recast the replace return status > BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS to 0, to indicate no > error. > And since BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR should also return 0, > which is also declared as 0, so we just return. Instead add

Re: [PATCH 1/9] btrfs: mark btrfs_dev_replace_start() as static

2018-11-07 Thread Nikolay Borisov
On 7.11.18 г. 13:43 ч., Anand Jain wrote: > There isn't any other consumer other than in its own file dev-replace.c. > > Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov > --- > fs/btrfs/dev-replace.c | 2 +- > fs/btrfs/dev-replace.h | 3 --- > 2 files changed, 1 insertion(+), 4

[PATCH 7/9] btrfs: quiten warn if the replace is canceled at finish

2018-11-07 Thread Anand Jain
When we successfully cancel the replace its scrub returns -ECANCELED, which then passed to btrfs_dev_replace_finishing(), it cleans up based on the scrub returned status and propagates the same -ECANCELED back the parent function. So skip the -ECANCELED error to log the WARN. Signed-off-by: Anand

[PATCH 8/9] btrfs: user requsted replace cancel is not an error

2018-11-07 Thread Anand Jain
As of now only user requested replace cancel can cancel the replace-scrub so no need to log error for it. Signed-off-by: Anand Jain --- fs/btrfs/dev-replace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index

[PATCH 6/9] btrfs: replace's scrub must not be running in replace suspended state

2018-11-07 Thread Anand Jain
When the replace state is placed in the suspended state, btrfs_scrub_cancel() should fail with -ENOTCONN as there is no scrub running, as a safety catch check if btrfs_scrub_cancel() returns -ENOTCONN and assert if it doesn't. Signed-off-by: Anand Jain --- fs/btrfs/dev-replace.c | 4 +++- 1

[PATCH 9/9] btrfs: add explicit check for replace result no error

2018-11-07 Thread Anand Jain
We recast the replace return status BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS to 0, to indicate no error. And since BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR should also return 0, which is also declared as 0, so we just return. Instead add it to the if statement so that there is enough clarity

[PATCH 0/9] fix replace-start and replace-cancel racing

2018-11-07 Thread Anand Jain
Replace-start and replace-cancel threads can race to create a messy situation leading to UAF. We use the scrub code to write the blocks on the replace target. So if we haven't have set the replace-scrub-running yet, without this patch we just ignore the error and free the target device. When this

[PATCH 5/9] btrfs: replace cancel is successful if scrub cancel is successful

2018-11-07 Thread Anand Jain
In btrfs_dev_replace_cancel() we should check if the btrfs_scrub_cancel() is successful. If the btrfs_scrub_cancel() fails, return BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED so that user can try to cancel the replace again. Signed-off-by: Anand Jain --- fs/btrfs/dev-replace.c | 22

<    5   6   7   8   9   10   11   12   13   14   >