Re: [PATCH 04/13] Kbuild: Rust support

2021-04-19 Thread David Sterba
On Fri, Apr 16, 2021 at 07:34:51PM +0200, Miguel Ojeda wrote: > On Fri, Apr 16, 2021 at 3:38 PM Peter Zijlstra wrote: > > > > So if I read all this right, rust compiles to .o and, like any other .o > > file is then fed into objtool (for x86_64). Did you have any problems > > with objtool? Does it

Re: [PATCH v2] fs/btrfs: Fix uninitialized variable

2021-04-19 Thread David Sterba
ed ROMDHANI > --- > v2: add a default case as proposed by David Sterba > --- > fs/btrfs/zoned.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c > index eeb3ebe11d7a..82527308d165 100644 > --- a/fs/btrfs/zoned.c > +++

Re: [PATCH-next] fs/btrfs: Fix uninitialized variable

2021-04-16 Thread David Sterba
On Tue, Apr 13, 2021 at 02:06:04PM +0100, Khaled ROMDHANI wrote: > The variable zone is not initialized. It > may causes a failed assertion. Failed assertion means the 2nd one checking that the result still fits to 32bit type. That would mean that none of the cases were hit, but all callers pass

[GIT PULL] Btrfs fix for 5.12-rc7

2021-04-11 Thread David Sterba
From: David Sterba Hi, here's one more patch that we'd like to get to 5.12 before release, it's changing where and how the superblock is stored in the zoned mode. It is an on-disk format change but so far there are no implications for users as the proper mkfs support hasn't been merged

Re: [PATCH] btrfs: Use readahead_batch_length

2021-04-06 Thread David Sterba
On Sun, Mar 21, 2021 at 09:03:11PM +, Matthew Wilcox (Oracle) wrote: > Implement readahead_batch_length() to determine the number of bytes in > the current batch of readahead pages and use it in btrfs. > > Signed-off-by: Matthew Wilcox (Oracle) Thanks, I'll take it through my tree as btrfs

Re: [PATCH] fs: btrfs: Remove repeated struct declaration

2021-04-06 Thread David Sterba
On Thu, Apr 01, 2021 at 04:03:39PM +0800, Wan Jiabing wrote: > struct btrfs_inode is declared twice. One is declared at 67th line. > The blew declaration is not needed. Remove the duplicate. > struct btrfs_fs_info should be declared in the forward declarations. > Move it to the forward

Re: disk-io.c:undefined reference to `atomic64_set_386'

2021-04-06 Thread David Sterba
On Thu, Apr 01, 2021 at 12:34:38AM +0800, kernel test robot wrote: > Hi Josef, > > FYI, the error/warning still remains. > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > master > head: 5e46d1b78a03d52306f21f77a4e4a144b6d31486 > commit:

Re: [PATCH] btrfs: Remove useless call "zlib_inflateEnd"

2021-04-01 Thread David Sterba
On Tue, Mar 30, 2021 at 06:17:01PM +0800, Jiapeng Chong wrote: > Fix the following whitescan warning: > > Calling "zlib_inflateEnd(>strm)" is only useful for its > return value, which is ignored. According to the zlib API documentation in include/linux/zlib.h 301 extern int zlib_deflateEnd

Re: [PATCH] [v2] btrfs: zoned: bail out in btrfs_alloc_chunk for bad input

2021-03-29 Thread David Sterba
gt; data corruption, and the compile-time warning. > > Fixes: 1cd6121f2a38 ("btrfs: zoned: implement zoned chunk allocator") > Link: https://lore.kernel.org/lkml/20210323132343.gf7...@twin.jikos.cz/ > Suggested-by: David Sterba > Signed-off-by: Arnd Bergmann Added to misc-next, thanks.

Re: [PATCH v2] btrfs: fix a potential hole-punching failure

2021-03-29 Thread David Sterba
On Thu, Mar 25, 2021 at 09:56:22AM +0800, bingjingc wrote: > From: BingJing Chang > > In commit d77815461f04 ("btrfs: Avoid trucating page or punching hole > in a already existed hole."), existed holes can be skipped by calling > find_first_non_hole() to adjust *start and *len. However, if the

Re: [PATCH] btrfs: Fix a typo

2021-03-26 Thread David Sterba
On Fri, Mar 26, 2021 at 06:29:32AM +0530, Bhaskar Chowdhury wrote: > > s/reponsible/responsible/ So this is exactly what I don't want to see happen - one patch per typo. I tried to explain it in the previous patch, please either fix all typos under fs/btrfs or don't bother.

Re: [PATCH] btrfs: fixed rudimentary typos

2021-03-25 Thread David Sterba
On Thu, Mar 25, 2021 at 11:40:04PM +0530, Bhaskar Chowdhury wrote: > On 13:49 Thu 25 Mar 2021, David Sterba wrote: > >On Thu, Mar 25, 2021 at 09:51:13AM +0530, Bhaskar Chowdhury wrote: > >> > >> s/contaning/containing > >> s/clearning/clearing/ > >

[GIT PULL] Btrfs fixes for 5.12-rc5

2021-03-25 Thread David Sterba
From: David Sterba Hi, there are few fixes for issues that have some user visibility and are simple enough for this time of development cycle. Please pull thanks. - a few fixes for rescue= mount option, adding more checks for missing trees - fix sleeping in atomic context on qgroup

Re: [PATCH] btrfs: fixed rudimentary typos

2021-03-25 Thread David Sterba
On Thu, Mar 25, 2021 at 09:51:13AM +0530, Bhaskar Chowdhury wrote: > > s/contaning/containing > s/clearning/clearing/ Have hou scanned the whole subdirectory for typos? We do typo fixing about once a year in one big patch and won't fix them one by one.

Re: [PATCH AUTOSEL 5.11 26/44] btrfs: track qgroup released data in own variable in insert_prealloc_file_extent

2021-03-25 Thread David Sterba
er easy to > overwrite the @ret and cause tons of qgroup related bugs. > > Fix such abuse by introducing new variable @qgroup_released, so that we > won't reuse the existing variable @ret. > > Signed-off-by: Qu Wenruo > Reviewed-by: David Sterba > Signed-off-by: David St

Re: [PATCH] btrfs: zoned: fix uninitialized max_chunk_size

2021-03-23 Thread David Sterba
On Tue, Mar 23, 2021 at 01:46:19PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > The ctl->max_chunk_size member might be used uninitialized > when none of the three conditions for initializing it in > init_alloc_chunk_ctl_policy_zoned() are true: > > In function

Re: [PATCH v2 04/18] btrfs: convert to miscattr

2021-03-23 Thread David Sterba
On Mon, Mar 22, 2021 at 03:49:02PM +0100, Miklos Szeredi wrote: > Use the miscattr API to let the VFS handle locking, permission checking and > conversion. > > Signed-off-by: Miklos Szeredi > Cc: David Sterba > --- > fs/btrfs/ctree.h | 3 + > fs/btrfs/inode.c |

Re: [PATCH v2 01/18] vfs: add miscattr ops

2021-03-23 Thread David Sterba
On Mon, Mar 22, 2021 at 03:33:38PM -0700, Darrick J. Wong wrote: > On Mon, Mar 22, 2021 at 03:48:59PM +0100, Miklos Szeredi wrote: > > --- a/Documentation/filesystems/vfs.rst > > +++ b/Documentation/filesystems/vfs.rst > > @@ -441,6 +441,9 @@ As of kernel 2.6.22, the following members are defined:

[GIT PULL] Btrfs fixes for 5.12-rc4

2021-03-18 Thread David Sterba
From: David Sterba Hi, there are still regressions being found and fixed in the zoned mode and subpage code, the rest are fixes for bugs reported by users. Please pull, thanks. Regressions: - subpage block support: - readahead works on the proper block size - fix last page zeroing

Re: [PATCH v2] btrfs: Use immediate assignment when referencing cc-option

2021-03-17 Thread David Sterba
On Wed, Mar 17, 2021 at 09:08:48AM -0700, Victor Erminpour wrote: > Calling cc-option will use KBUILD_CFLAGS, which when lazy setting > subdir-ccflags-y produces the following build error: > > scripts/Makefile.lib:10: *** Recursive variable `KBUILD_CFLAGS' \ > references itself

Re: [PATCH] btrfs: Use immediate assignment when referencing cc-option

2021-03-17 Thread David Sterba
On Tue, Mar 16, 2021 at 03:46:10PM -0700, Victor Erminpour wrote: > Calling cc-option will use KBUILD_CFLAGS, which when lazy setting > subdir-ccflags-y produces the following build error: > > scripts/Makefile.lib:10: *** Recursive variable `KBUILD_CFLAGS' \ > references itself

Re: [PATCH 0/4] btrfs: Convert more kmaps to kmap_local_page()

2021-03-16 Thread David Sterba
On Fri, Mar 12, 2021 at 12:05:00PM -0800, Ira Weiny wrote: > On Fri, Mar 12, 2021 at 08:41:41PM +0100, David Sterba wrote: > > On Tue, Feb 16, 2021 at 06:48:22PM -0800, ira.we...@intel.com wrote: > > > From: Ira Weiny > > > > > > I am submitting these

Re: [PATCH 1/4] fs/btrfs: Convert kmap to kmap_local_page() using coccinelle

2021-03-16 Thread David Sterba
On Fri, Mar 12, 2021 at 12:03:14PM -0800, Ira Weiny wrote: > On Fri, Mar 12, 2021 at 07:58:39PM +0100, David Sterba wrote: > > On Tue, Feb 16, 2021 at 06:48:23PM -0800, ira.we...@intel.com wrote: > > > --- a/fs/btrfs/lzo.c > > > +++ b/fs/btrfs/lzo.c > > > @@ -11

Re: [PATCH 0/4] btrfs: Convert more kmaps to kmap_local_page()

2021-03-12 Thread David Sterba
On Tue, Feb 16, 2021 at 06:48:22PM -0800, ira.we...@intel.com wrote: > From: Ira Weiny > > I am submitting these for 5.13. > > Further work to remove more kmap() calls in favor of the kmap_local_page() > this > series converts those calls which required more than a common pattern which > were

Re: [PATCH 2/4] fs/btrfs: Convert raid5/6 kmaps to kmap_local_page()

2021-03-12 Thread David Sterba
On Tue, Feb 16, 2021 at 06:48:24PM -0800, ira.we...@intel.com wrote: > From: Ira Weiny > > These kmaps are thread local and don't need to be atomic. So they can use > the more efficient kmap_local_page(). However, the mapping of pages in > the stripes and the additional parity and qstripe

Re: [PATCH 1/4] fs/btrfs: Convert kmap to kmap_local_page() using coccinelle

2021-03-12 Thread David Sterba
On Tue, Feb 16, 2021 at 06:48:23PM -0800, ira.we...@intel.com wrote: > --- a/fs/btrfs/lzo.c > +++ b/fs/btrfs/lzo.c > @@ -118,7 +118,7 @@ int lzo_compress_pages(struct list_head *ws, struct > address_space *mapping, > struct workspace *workspace = list_entry(ws, struct workspace, list); >

Re: [PATCH 0/3] btrfs: Convert kmap/memset/kunmap to memzero_user()

2021-03-12 Thread David Sterba
On Thu, Mar 11, 2021 at 07:57:48AM -0800, Ira Weiny wrote: > On Wed, Mar 10, 2021 at 03:58:36PM -0800, Andrew Morton wrote: > > On Tue, 9 Mar 2021 13:21:34 -0800 ira.we...@intel.com wrote: > > > > > Previously this was submitted to convert to zero_user()[1]. zero_user() > > > is not > > > the

Re: [PATCH 3/3] btrfs: Use memzero_page() instead of open coded kmap pattern

2021-03-12 Thread David Sterba
ra(page, GenTo, GenSize); > | > -memset(GenTo, GenValue, GenSize); > +memset_pageExtra(page, GenValue, GenTo, GenSize); > ) > ...+> > ( > -kunmap(page); > | > -kunmap_atomic(ptr); > ) > > // Remove any pointers left unused > @ > depends on memset_rule2 > @ > identifier memset_rule2.ptr; > type VP, VP1; > @@ > > -VP ptr; > ... when != ptr; > ? VP1 ptr; > > // > > Signed-off-by: Ira Weiny Reviewed-by: David Sterba

Re: [PATCH] btrfs: turn btrfs_destroy_delayed_refs() into void function

2021-03-09 Thread David Sterba
On Tue, Mar 09, 2021 at 05:32:54PM +0800, Yang Li wrote: > This function always return '0' and no callers use the return value. > So make it a void function. > > This eliminates the following coccicheck warning: > ./fs/btrfs/disk-io.c:4522:5-8: Unneeded variable: "ret". Return "0" on > line 4530

Re: [PATCH AUTOSEL 5.11 03/12] btrfs: subpage: fix the false data csum mismatch error

2021-03-08 Thread David Sterba
On Sun, Mar 07, 2021 at 08:57:37AM -0500, Sasha Levin wrote: > From: Qu Wenruo > > [ Upstream commit c28ea613fafad910d08f67efe76ae552b1434e44 ] > > [BUG] > When running fstresss, we can hit strange data csum mismatch where the > on-disk data is in fact correct (passes scrub). > > With some

[GIT PULL] Btrfs fixes for 5.12-rc1, part 2

2021-03-05 Thread David Sterba
From: David Sterba Hi, more regression fixes and stabilization. Please pull, thanks. Regressions: - zoned mode - count zone sizes in wider int types - fix space accounting for read-only block groups - subpage: fix page tail zeroing Fixes: - fix spurious warning when remounting

Re: [PATCH] btrfs: Assign boolean values to a bool variable

2021-03-04 Thread David Sterba
On Wed, Mar 03, 2021 at 05:45:28PM +0800, Jiapeng Chong wrote: > Fix the following coccicheck warnings: > > ./fs/btrfs/volumes.c:1462:10-11: WARNING: return of 0/1 in function > 'dev_extent_hole_check_zoned' with return type bool. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong

Re: [PATCH] btrfs: Remove unused variable ret

2021-03-02 Thread David Sterba
On Fri, Feb 19, 2021 at 02:18:58PM +0800, Jiapeng Chong wrote: > Fix the following coccicheck warnings: > > ./fs/btrfs/disk-io.c:4403:5-8: Unneeded variable: "ret". Return "0" on > line 4411. That maybe stops the check to report the warning but it's not the right way to fix the code. The callees

Re: [PATCH] btrfs: turn btrfs_destroy_all_ordered_extents() into void functions

2021-03-02 Thread David Sterba
On Tue, Mar 02, 2021 at 04:57:56PM +0800, Yang Li wrote: > These functions always return '0' and no callers use the return > value. So make it a void function. The reasoning needs to go the other way around: you can make a function return void iff all callees also return void and don't do BUG_ON

Re: [PATCH 34/44] tty: do not check tty_unregister_driver's return value

2021-03-02 Thread David Sterba
gt; In the next patch, tty_unregister_driver's return type will be switched > to void. > > Signed-off-by: Jiri Slaby > Cc: Chris Zankel > Cc: Max Filippov > Cc: linux-xte...@linux-xtensa.org > Cc: Jiri Kosina > Cc: David Sterba > --- For > drivers/tty/ipwirel

[GIT PULL] Kmap conversions for 5.12, take 2

2021-03-01 Thread David Sterba
Hi, this pull request contains changes regarding kmap API use and eg. conversion from kmap_atomic to kmap_local_page. Changes against v1 [1]: - dropped patches using zero_user - retested with my regular fstests-based workloads over the weekend I'm keeping the original merge changelog as it

[GIT PULL] Btrfs updates for 5.12-rc2

2021-03-01 Thread David Sterba
From: David Sterba Hi, first batch of fixes that usually arrive during the merge window code freeze. Regressions and stable material. Please pull, thanks. Regressions: - fix deadlock in log sync in zoned mode - fix bugs in subpage mode still wrongly assuming sectorsize == page size Fixes

Re: linux-next: manual merge of the akpm-current tree with the btrfs tree

2021-03-01 Thread David Sterba
On Fri, Feb 26, 2021 at 06:16:26AM +0100, Christoph Hellwig wrote: > On Fri, Feb 26, 2021 at 10:32:50AM +1100, Stephen Rothwell wrote: > > > > - return filemap_read(iocb, to, ret); > > > > + if (iocb->ki_flags & IOCB_NOWAIT) > > > > + iocb->ki_flags |= IOCB_NOIO; > > > >

Re: [GIT PULL] Kmap conversions for 5.12

2021-02-26 Thread David Sterba
On Thu, Feb 25, 2021 at 08:32:34AM -0800, Ira Weiny wrote: > On Thu, Feb 25, 2021 at 02:12:52PM +0100, David Sterba wrote: > > On Wed, Feb 24, 2021 at 09:59:12AM -0800, Ira Weiny wrote: > > > On Wed, Feb 24, 2021 at 01:30:49PM +0100, David Sterba wrote: > > > > On T

Re: [GIT PULL] Kmap conversions for 5.12

2021-02-25 Thread David Sterba
On Wed, Feb 24, 2021 at 09:59:12AM -0800, Ira Weiny wrote: > On Wed, Feb 24, 2021 at 01:30:49PM +0100, David Sterba wrote: > > On Tue, Feb 23, 2021 at 11:25:06AM -0800, Ira Weiny wrote: > > > On Tue, Feb 23, 2021 at 09:13:42AM -0800, Linus Torvalds wrote: > > > > O

Re: [PATCH] btrfs: Fixed a brace coding style issue

2021-02-24 Thread David Sterba
On Mon, Feb 15, 2021 at 08:38:20PM +0530, Maheep Kumar Kathuria wrote: > Fixed a coding style issue in thresh_exec_hook() > > Signed-off-by: Maheep Kumar Kathuria > --- > fs/btrfs/async-thread.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/btrfs/async-thread.c

Re: [PATCH AUTOSEL 5.11 54/67] btrfs: make btrfs_start_delalloc_root's nr argument a long

2021-02-24 Thread David Sterba
On Wed, Feb 24, 2021 at 07:50:12AM -0500, Sasha Levin wrote: > From: Nikolay Borisov > > [ Upstream commit 9db4dc241e87fccd8301357d5ef908f40b50f2e3 ] > > It's currently u64 which gets instantly translated either to LONG_MAX > (if U64_MAX is passed) or cast to an unsigned long (which is in fact,

Re: [PATCH AUTOSEL 5.11 55/67] btrfs: only let one thread pre-flush delayed refs in commit

2021-02-24 Thread David Sterba
te with > (READ|WRITE)_ONCE so as to avoid a theoretical tear, in this case I > don't think this could happen but I imagine at some point KCSAN would > flag such an access as racy (which it is). > > [1] > https://lore.kernel.org/linux-btrfs/e1fd5cc1-0f28-f670-69f4-e9958b496.

Re: [GIT PULL] Kmap conversions for 5.12

2021-02-24 Thread David Sterba
On Tue, Feb 23, 2021 at 11:25:06AM -0800, Ira Weiny wrote: > On Tue, Feb 23, 2021 at 09:13:42AM -0800, Linus Torvalds wrote: > > On Tue, Feb 23, 2021 at 7:03 AM David Sterba wrote: [...] > Sorry. I will change it. Let me know how you want to proceed with the patchset/pull request

[GIT PULL] Kmap conversions for 5.12

2021-02-23 Thread David Sterba
From: David Sterba Hi, this pull request contains changes regarding kmap API use and eg. conversion from kmap_atomic to kmap_local_page. The API belongs to memory management but to save cross-tree dependency headaches we've agreed to take it through the btrfs tree because there are some

Re: [PATCH] btrfs: ref-verify: use 'inline void' keyword ordering

2021-02-22 Thread David Sterba
> Fixes: fd708b81d972 ("Btrfs: add a extent ref verify tool") > Signed-off-by: Randy Dunlap > Cc: Josef Bacik > Cc: David Sterba > Cc: Chris Mason > Cc: linux-bt...@vger.kernel.org > Cc: Andrew Morton Added to misc-next thanks.

Re: [PATCH 4/7] fsdax: Replace mmap entry in case of CoW

2021-02-16 Thread David Sterba
On Mon, Feb 08, 2021 at 01:09:21AM +0800, Shiyang Ruan wrote: > We replace the existing entry to the newly allocated one > in case of CoW. Also, we mark the entry as PAGECACHE_TAG_TOWRITE > so writeback marks this entry as writeprotected. This > helps us snapshots so new write pagefaults after

[GIT PULL] Btrfs updates for 5.12

2021-02-16 Thread David Sterba
Hi, this update brings updates of space handling, performance improvements or bug fixes. The subpage block size and zoned mode features have reached state where they're usable but with limitations. The branch merges cleanly on top of current master, there are some minor conflicts reported by

[GIT PULL] AFFS fix for 5.12

2021-02-15 Thread David Sterba
Hi, there's one minor fix for error handling in rename exchange. Please pull, thanks. The following changes since commit 92bf22614b21a2706f4993b278017e437f7785b3: Linux 5.11-rc7 (2021-02-07 13:57:38 -0800) are available in the

[GIT PULL] Btrfs fix for 5.11-rc8

2021-02-13 Thread David Sterba
Hi, a regression fix caused by a refactoring in 5.11. A corrupted superblock wouldn't be detected by checksum verification due to wrongly placed initialization of the checksum length, thus making memcmp always work. I've verified it manually and ran other test suites before sending this. Please

Re: [PATCH V2 0/8] btrfs: convert kmaps to core page calls

2021-02-11 Thread David Sterba
On Tue, Feb 09, 2021 at 10:22:13PM -0800, ira.we...@intel.com wrote: > From: Ira Weiny > > Changes from V1: > Rework commit messages because they were very weak > Change 'fs/btrfs: X' to 'btrfs: x' > https://lore.kernel.org/lkml/20210209151442.gu1...@suse.cz/ >

Re: [PATCH V2 4/8] mm/highmem: Add VM_BUG_ON() to mem*_page() calls

2021-02-11 Thread David Sterba
On Wed, Feb 10, 2021 at 01:22:28PM -0800, Ira Weiny wrote: > On Wed, Feb 10, 2021 at 06:56:06PM +, Matthew Wilcox wrote: > > On Wed, Feb 10, 2021 at 08:29:01AM -0800, Ira Weiny wrote: > > > And I thought it was a good idea. Any file system development should have > > > tests with DEBUG_VM

Re: [PATCH] fs/affs: release old buffer head on error path

2021-02-09 Thread David Sterba
On Wed, Jan 20, 2021 at 12:51:13AM -0800, Pan Bian wrote: > The reference count of the old buffer head should be decremented on path > that fails to get the new buffer head. > > Fixes: 6b4657667ba0 ("fs/affs: add rename exchange") > Signed-off-by: Pan Bian Thanks, added to affs branch. The fix

Re: [PATCH 2/4] fs/btrfs: Use memcpy_[to|from]_page()

2021-02-09 Thread David Sterba
On Fri, Feb 05, 2021 at 03:23:02PM -0800, ira.we...@intel.com wrote: > From: Ira Weiny There should be a short explanation what the patch does, eg. "use helper for open coded kmap_atomic/memcpy/kunmap_atomic", although I see there are conversions kmap_atomic -> kmap_local not in the coccinelle

Re: [PATCH 0/4] btrfs: Convert kmaps to core page calls

2021-02-09 Thread David Sterba
On Fri, Feb 05, 2021 at 03:23:00PM -0800, ira.we...@intel.com wrote: > From: Ira Weiny > > There are many places where kmap//kunmap patterns occur. We lift > these various patterns to core common functions and use them in the btrfs file > system. At the same time we convert those core

Re: [PATCH 0/3] fs/efs: Follow kernel style guide

2021-02-07 Thread David Sterba
On Fri, Feb 05, 2021 at 11:37:46PM +0100, Richard Weinberger wrote: > On Fri, Feb 5, 2021 at 11:26 PM Amy Parker wrote: > > > > On Fri, Feb 5, 2021 at 5:1 AM David Sterba wrote: > > > > > > On Thu, Feb 04, 2021 at 08:52:14PM -0800, Amy Parker wrote: > &g

Re: [PATCH] ia64: Fix style guide breakage

2021-02-07 Thread David Sterba
On Fri, Feb 05, 2021 at 02:06:18PM -0800, Amy Parker wrote: > Some statements do not have proper spacing between their C > keywords (commonly if and for) throughout files in the ia64 tree. > This patch corrects this to follow the kernel code style guide. > > Signed-off-by: Amy Parker > --- >

Re: [PATCH] fs/btrfs: Fix raid6 qstripe kmap'ing

2021-02-05 Thread David Sterba
On Thu, Feb 04, 2021 at 07:52:36PM -0800, Ira Weiny wrote: > On Thu, Feb 04, 2021 at 04:26:08PM +0100, David Sterba wrote: > > On Wed, Feb 03, 2021 at 04:56:48PM +0100, David Sterba wrote: > > > On Wed, Jan 27, 2021 at 10:15:03PM -0800, ira.we...@intel.com wrote: >

Re: [PATCH 0/3] fs/efs: Follow kernel style guide

2021-02-05 Thread David Sterba
On Thu, Feb 04, 2021 at 08:52:14PM -0800, Amy Parker wrote: > As the EFS driver is old and non-maintained, Is anybody using EFS on current kernels? There's not much point updating it to current coding style, deleting fs/efs is probably the best option. The EFS name is common for several

Re: [PATCH] fs/btrfs: Fix raid6 qstripe kmap'ing

2021-02-04 Thread David Sterba
On Wed, Feb 03, 2021 at 04:56:48PM +0100, David Sterba wrote: > On Wed, Jan 27, 2021 at 10:15:03PM -0800, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > When a qstripe is required an extra page is allocated and mapped. There > > were 3 problems. > >

Re: [PATCH] fs/btrfs: Fix raid6 qstripe kmap'ing

2021-02-03 Thread David Sterba
th a single mapping on each > iteration by raid6_call.gen_syndrome() without remapping. So map the > page for the duration of the loop. > > Similarly, improve the algorithm by mapping the parity page just 1 time. > > Fixes: 5a6ac9eacb49 ("Btrfs, raid56: support parity scrub on raid56") >

[GIT PULL] Btrfs fixes for 5.11-rc6

2021-01-29 Thread David Sterba
Hi, I'm not sure the first post of this pull request made it through so sending again. A few more fixes for a late rc: - fix lockdep complaint on 32bit arches and also remove an unsafe memory use due to device vs filesystem lifetime - two fixes for free space tree - race during log replay

Re: [PATCH v2] btrfs: Avoid calling btrfs_get_chunk_map() twice

2021-01-29 Thread David Sterba
On Fri, Jan 29, 2021 at 07:02:41PM +, Michal Rostecki wrote: > On Fri, Jan 29, 2021 at 06:47:53PM +0100, David Sterba wrote: > > On Fri, Jan 29, 2021 at 05:15:21PM +, Michal Rostecki wrote: > > > On Fri, Jan 29, 2021 at 11:22:48AM -0500, Josef Bacik wrote: > >

Re: [PATCH v2] btrfs: Avoid calling btrfs_get_chunk_map() twice

2021-01-29 Thread David Sterba
On Fri, Jan 29, 2021 at 05:15:21PM +, Michal Rostecki wrote: > On Fri, Jan 29, 2021 at 11:22:48AM -0500, Josef Bacik wrote: > > On 1/27/21 8:57 AM, Michal Rostecki wrote: > > > From: Michal Rostecki > > > > > > Before this change, the btrfs_get_io_geometry() function was calling > > >

Re: [PATCH v2] btrfs: Avoid calling btrfs_get_chunk_map() twice

2021-01-28 Thread David Sterba
On Wed, Jan 27, 2021 at 02:57:27PM +0100, Michal Rostecki wrote: > From: Michal Rostecki > > Before this change, the btrfs_get_io_geometry() function was calling > btrfs_get_chunk_map() to get the extent mapping, necessary for > calculating the I/O geometry. It was using that extent mapping only

Re: [PATCH v2] btrfs: Avoid calling btrfs_get_chunk_map() twice

2021-01-28 Thread David Sterba
On Thu, Jan 28, 2021 at 10:38:45AM +, Filipe Manana wrote: > On Thu, Jan 28, 2021 at 12:01 AM Michal Rostecki wrote: > > > > From: Michal Rostecki > > > > Before this change, the btrfs_get_io_geometry() function was calling > > btrfs_get_chunk_map() to get the extent mapping, necessary for >

Re: [PATCH] btrfs: Simplify the calculation of variables

2021-01-28 Thread David Sterba
On Wed, Jan 27, 2021 at 04:11:37PM +0800, Abaci Team wrote: > Fix the following coccicheck warnings: > > ./fs/btrfs/delayed-inode.c:1157:39-41: WARNING !A || A && B is > equivalent to !A || B. > > Reported-by: Abaci Robot > Suggested-by: Jiapeng Zhong > Signed-off-by: Abaci Team Added to

Re: linux-next: build warning after merge of the btrfs tree

2021-01-27 Thread David Sterba
On Wed, Jan 27, 2021 at 10:18:31AM +1100, Stephen Rothwell wrote: > Hi all, > > After merging the btrfs tree, today's linux-next build (powerpc > ppc64_defconfig) produced this warning: > > fs/btrfs/space-info.c:1373: warning: Function parameter or member 'start_ns' > not described in

Re: [PATCH] btrfs: remove redundant NULL check

2021-01-21 Thread David Sterba
On Thu, Jan 21, 2021 at 04:19:47PM +0800, Yang Li wrote: > Fix below warnings reported by coccicheck: > ./fs/btrfs/raid56.c:237:2-8: WARNING: NULL check before some freeing > functions is not needed. > > Reported-by: Abaci Robot > Signed-off-by: Yang Li Added to misc-next, thanks.

[GIT PULL] Btrfs fixes for 5.11-rc5

2021-01-20 Thread David Sterba
:00:11 +0100) David Sterba (1): btrfs: no need to run delayed refs after commit_fs_roots during commit Filipe Manana (1): btrfs: send: fix invalid clone operations when cloning from the same file and root Josef Bacik (4

Re: [LKP] Re: [btrfs] e076ab2a2c: fio.write_iops -18.3% regression

2021-01-14 Thread David Sterba
On Wed, Jan 13, 2021 at 01:58:18PM +0800, Xing Zhengjun wrote: > > > On 1/12/2021 11:45 PM, David Sterba wrote: > > On Tue, Jan 12, 2021 at 11:36:14PM +0800, kernel test robot wrote: > >> Greeting, > >> > >> FYI, we noticed a -18.3%

Re: [btrfs] e076ab2a2c: fio.write_iops -18.3% regression

2021-01-12 Thread David Sterba
On Tue, Jan 12, 2021 at 11:36:14PM +0800, kernel test robot wrote: > > Greeting, > > FYI, we noticed a -18.3% regression of fio.write_iops due to commit: > > > commit: e076ab2a2ca70a0270232067cd49f76cd92efe64 ("btrfs: shrink delalloc > pages instead of full inodes") >

[GIT PULL] Btrfs fixes for 5.11-rc4

2021-01-11 Thread David Sterba
Hi, more material for stable trees. Please pull, thanks. - tree-checker: check item end overflow - fix false warning during relocation regarding extent type - fix inode flushing logic, caused notable performance regression (since 5.10) - debugging fixups: - print correct offset for reloc

Re: KASAN: null-ptr-deref Write in start_transaction

2021-01-08 Thread David Sterba
On Fri, Jan 08, 2021 at 02:22:00PM +, Filipe Manana wrote: > On Thu, Jan 7, 2021 at 1:13 PM syzbot > wrote: > > > > syzbot suspects this issue was fixed by commit: > > > > commit f30bed83426c5cb9fce6cabb3f7cc5a9d5428fcc > > Author: Filipe Manana > > Date: Fri Nov 13 11:24:17 2020 + > >

Re: KASAN: null-ptr-deref Write in start_transaction

2021-01-08 Thread David Sterba
On Fri, Jan 08, 2021 at 02:22:00PM +, Filipe Manana wrote: > On Thu, Jan 7, 2021 at 1:13 PM syzbot > wrote: > > > > syzbot suspects this issue was fixed by commit: > > > > commit f30bed83426c5cb9fce6cabb3f7cc5a9d5428fcc > > Author: Filipe Manana > > Date: Fri Nov 13 11:24:17 2020 + > >

Re: KASAN: null-ptr-deref Write in start_transaction

2021-01-08 Thread David Sterba
On Fri, Jan 08, 2021 at 10:17:25AM +0100, Dmitry Vyukov wrote: > On Thu, Jan 7, 2021 at 2:11 PM syzbot > wrote: > > > > syzbot suspects this issue was fixed by commit: > > > > commit f30bed83426c5cb9fce6cabb3f7cc5a9d5428fcc > > Author: Filipe Manana > > Date: Fri Nov 13 11:24:17 2020 + > >

[GIT PULL] Btrfs fixes for 5.11-rc3

2021-01-06 Thread David Sterba
Hi, a few more fixes that arrived before the end of the year. Please pull, thanks. - a bunch of fixes related to transaction handle lifetime wrt various operations (umount, remount, qgroup scan, orphan cleanup) - async discard scheduling fixes - fix item size calculation when item keys

Re: [PATCH v2] fs/btrfs: avoid null pointer dereference if reloc control has not been initialized

2021-01-05 Thread David Sterba
l pointer dereference. > > Signed-off-by: Defang Bo Reviewed-by: David Sterba > --- Oh and don't add reviewed-by unless it's explicitly stated by the person. > Changes since v1: > - More accurate description for this patch to describe how the NULL can get > there. > --- > --- fs

Re: [PATCH 3/3] fs/btrfs: avoid null pointer dereference if reloc control has not been initialized

2021-01-04 Thread David Sterba
On Sun, Dec 27, 2020 at 10:55:31PM +0800, Defang Bo wrote: > Similar to commmit<389305b2>, Please use full commit reference like 389305b2aa68 ("btrfs: relocation: Only remove reloc rb_trees if reloc control has been initialized") > it turns out that fs_info::reloc_ctl can be NULL , Please

Re: [PATCH v2 -next] btrfs: use DEFINE_MUTEX() for mutex lock

2021-01-04 Thread David Sterba
On Thu, Dec 24, 2020 at 09:22:17PM +0800, Zheng Yongjun wrote: > mutex lock can be initialized automatically with DEFINE_MUTEX() > rather than explicitly calling mutex_init(). And is there some reason why it should be done that way?

Re: [f2fs-dev] [PATCH v7 0/3] Update to zstd-1.4.6

2020-12-16 Thread David Sterba
On Wed, Dec 16, 2020 at 11:58:07AM +1100, Herbert Xu wrote: > On Wed, Dec 16, 2020 at 12:48:51AM +, Nick Terrell wrote: > > > > Thanks for the advice! The first zstd patches went through Herbert’s tree, > > which is > > why I’ve sent them this way. > > Sorry, but I'm not touch these patches

Re: [PATCH] btrfs: fix boolreturn.cocci warnings

2020-12-15 Thread David Sterba
On Sun, Nov 01, 2020 at 01:20:51PM +0800, kernel test robot wrote: > From: kernel test robot > > fs/btrfs/space-info.c:810:9-10: WARNING: return of 0/1 in function > 'need_preemptive_reclaim' with return type bool > > Return statements in functions returning bool should use > true/false

Re: [PATCH v2] btrfs: free-space-cache: Fix error return code in __load_free_space_cache

2020-12-15 Thread David Sterba
On Mon, Dec 07, 2020 at 09:56:12PM +0800, Zhihao Cheng wrote: > Fix to return the error code(instead always 0) when memory allocating > failed in __load_free_space_cache(). > > This lacks the analysis of consequences, so there's only one caller and By "This lacks the analysis of consequences" I

Re: linux-next: build failure after merge of the block tree

2020-12-14 Thread David Sterba
On Tue, Dec 15, 2020 at 08:43:00AM +1100, Stephen Rothwell wrote: > Hi David, > > On Mon, 14 Dec 2020 22:36:12 +0100 David Sterba wrote: > > > > On Mon, Dec 14, 2020 at 01:12:46PM -0700, Jens Axboe wrote: > > > On 12/14/20 1:09 PM, Stephen Rothwell wrote: >

Re: linux-next: build failure after merge of the block tree

2020-12-14 Thread David Sterba
On Mon, Dec 14, 2020 at 01:12:46PM -0700, Jens Axboe wrote: > On 12/14/20 1:09 PM, Stephen Rothwell wrote: > > Just a reminder that I am still applying the above merge fix. > > I sent in my core changes, but they haven't been pulled yet. So I guess > we're dealing with a timing situation...

[GIT PULL] Btrfs updates for 5.11

2020-12-14 Thread David Sterba
when remount will not change the free space tree btrfs: remove free space items when disabling space cache v1 btrfs: skip space_cache v1 setup when not using it btrfs: fix lockdep warning when creating free space tree David Sterba (22): btrfs: use the right number of levels

Re: [PATCH] btrfs: free-space-cache: Fix error return code in __load_free_space_cache

2020-12-04 Thread David Sterba
On Fri, Nov 20, 2020 at 09:08:04AM +0800, Zhihao Cheng wrote: > Fix to return the error code(instead always 0) when memory allocating > failed in __load_free_space_cache(). This lacks the analysis of consequences, so there's only one caller and that will treat values <=0 as 'cache not loaded'.

Re: [PATCH] btrfs: free-space-cache: Fix error return code in __load_free_space_cache

2020-12-04 Thread David Sterba
On Fri, Nov 20, 2020 at 09:08:04AM +0800, Zhihao Cheng wrote: > Fix to return the error code(instead always 0) when memory allocating > failed in __load_free_space_cache(). Hm right the error handling flow in that function is a mess and the error values are not set. Your patch is a minimal fix so

Re: [PATCH v6 3/3] lib: zstd: Upgrade to latest upstream zstd version 1.4.6

2020-12-04 Thread David Sterba
On Thu, Dec 03, 2020 at 07:58:16AM +0800, kernel test robot wrote: > All warnings (new ones prefixed by >>): > >lib/zstd/compress/zstd_double_fast.c: In function > 'ZSTD_compressBlock_doubleFast_extDict_generic': > >> lib/zstd/compress/zstd_double_fast.c:501:1: warning: the frame size of >

Re: [PATCH][next] btrfs: fix spelling mistake "inititialize" -> "initialize"

2020-11-28 Thread David Sterba
On Tue, Nov 17, 2020 at 01:07:04PM +, Colin King wrote: > From: Colin Ian King > > There is a spelling mistake in a btrfs_err error message. Fix it. > > Signed-off-by: Colin Ian King Folded to the patch, thanks.

Re: [PATCH -next] btrfs: remove unused variable

2020-11-28 Thread David Sterba
On Tue, Nov 17, 2020 at 05:47:43PM +0800, Zou Wei wrote: > Fix variable set but not used compilation warnings: > > fs/btrfs/ctree.c:1581:6: warning: variable ‘parent_level’ set but not used > [-Wunused-but-set-variable] > int parent_level; > ^~~~ > > fs/btrfs/zoned.c:503:6:

[GIT PULL] Btrfs fixes for 5.10-rc6

2020-11-27 Thread David Sterba
after error in root_item David Sterba (1): btrfs: tree-checker: add missing returns after data_ref alignment checks Filipe Manana (4): btrfs: fix missing delalloc new bit for new delalloc ranges btrfs: fix lockdep splat when reading qgroup config on mount btrfs: do nofs

Re: [PATCH 05/17] fs/btrfs: Convert to memzero_page()

2020-11-24 Thread David Sterba
On Mon, Nov 23, 2020 at 10:07:43PM -0800, ira.we...@intel.com wrote: > From: Ira Weiny > > Remove the kmap/memset()/kunmap pattern and use the new memzero_page() > call where possible. > > Cc: Chris Mason > Cc: Josef Bacik > Cc: David Sterba > Signed-off-by: I

Re: [PATCH v2] btrfs: return EAGAIN when receiving a pending signal in the defrag loops

2020-11-23 Thread David Sterba
On Wed, Nov 18, 2020 at 12:02:36PM +0800, xiakaixu1...@gmail.com wrote: > From: Kaixu Xia > > The variable ret is overwritten by the following variable defrag_count. > Actually the code should return EAGAIN when receiving a pending signal > in the defrag loops. This lacks explanation why is

Re: [PATCH] btrfs: remove the useless value assignment in block_rsv_release_bytes

2020-11-23 Thread David Sterba
On Tue, Nov 17, 2020 at 11:17:17AM +0800, kaixuxia wrote: > > > On 2020/11/16 23:15, David Sterba wrote: > > On Sun, Nov 15, 2020 at 02:39:23PM +0800, xiakaixu1...@gmail.com wrote: > >> From: Kaixu Xia > >> > >> The variable qgroup_to_relea

Re: [PATCH] btrfs: sysfs: remove unneeded semicolon

2020-11-16 Thread David Sterba
On Sun, Nov 01, 2020 at 07:30:08AM -0800, t...@redhat.com wrote: > From: Tom Rix > > A semicolon is not needed after a switch statement. > > Signed-off-by: Tom Rix Added to misc-next, thanks.

Re: [PATCH] btrfs: remove the useless value assignment in btrfs_defrag_file

2020-11-16 Thread David Sterba
On Sat, Nov 14, 2020 at 05:06:21PM +0800, xiakaixu1...@gmail.com wrote: > From: Kaixu Xia > > The variable ret is overwritten by the following variable defrag_count > and this assignment is useless, so remove it. This could be actually pointing to a bug, please explain why you think it's

Re: [PATCH] btrfs: remove the useless value assignment in block_rsv_release_bytes

2020-11-16 Thread David Sterba
On Sun, Nov 15, 2020 at 02:39:23PM +0800, xiakaixu1...@gmail.com wrote: > From: Kaixu Xia > > The variable qgroup_to_release is overwritten by the following if/else > statement before it is used, so this assignment is useless. Remove it. Again this lacks explanation why removing it is correct.

Re: [RFC] fs: Avoid to use lockdep information if it's turned off

2020-11-13 Thread David Sterba
On Thu, Nov 12, 2020 at 11:22:12AM +0800, Boqun Feng wrote: > For the "BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!" warning, do you see > that every time when you run xfstests and don't see other lockdep > splats? If so, that means we reach the limitation of number of lockdep > hlock chains, and we

Re: [RFC] fs: Avoid to use lockdep information if it's turned off

2020-11-11 Thread David Sterba
On Tue, Nov 10, 2020 at 04:33:27PM +0100, David Sterba wrote: > On Tue, Nov 10, 2020 at 09:37:37AM +0800, Boqun Feng wrote: > > I'll run another test on top of the development branch in case there are > unrelated lockdep warning bugs that have been fixed meanwhile. Similar reports

  1   2   3   4   5   6   7   8   9   10   >