Re: [PATCH -next] ext4: use DEFINE_MUTEX (and mutex_init() had been too late)

2020-12-23 Thread Theodore Y. Ts'o
On Wed, Dec 23, 2020 at 10:12:54PM +0800, Zheng Yongjun wrote: > Signed-off-by: Zheng Yongjun Why is mutex_init() too late? We only take the mutex after we mounting an ext4 file system, and that can't happen until ext4_init_fs is called. - Ted >

[GIT PULL] ext4 updates for v5.11-rc1

2020-12-22 Thread Theodore Y. Ts'o
The following changes since commit 418baf2c28f3473039f2f7377760bd8f6897ae18: Linux 5.10-rc5 (2020-11-22 15:36:08 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git tags/ext4_for_linus for you to fetch changes up to

Re: general protection fault in ext4_commit_super

2020-12-22 Thread Theodore Y. Ts'o
On Tue, Dec 22, 2020 at 12:28:53PM +0100, Jan Kara wrote: > > Fix e810c942a325 ("ext4: save error info to sb through journal if > > available") > > by flushing work as part of rollback. > > Thanks for having a look. I don't think the fix is quite correct though. The > flush_work() should be at

Re: [PATCH v2 0/3] add support for metadata encryption to F2FS

2020-12-17 Thread Theodore Y. Ts'o
On Thu, Dec 17, 2020 at 08:51:14PM +, Satya Tangirala wrote: > On Thu, Dec 17, 2020 at 01:08:49PM -0500, Theodore Y. Ts'o wrote: > > On Thu, Dec 17, 2020 at 03:04:32PM +, Satya Tangirala wrote: > > > This patch series adds support for metadata encryption to F2FS usin

Re: [PATCH] ext4: Don't leak old mountpoint samples

2020-12-17 Thread Theodore Y. Ts'o
On Tue, Dec 01, 2020 at 04:13:01PM +0100, Richard Weinberger wrote: > As soon the first file is opened, ext4 samples the mountpoint > of the filesystem in 64 bytes of the super block. > It does so using strlcpy(), this means that the remaining bytes > in the super block string buffer are

Re: [PATCH v2 0/3] add support for metadata encryption to F2FS

2020-12-17 Thread Theodore Y. Ts'o
On Thu, Dec 17, 2020 at 03:04:32PM +, Satya Tangirala wrote: > This patch series adds support for metadata encryption to F2FS using > blk-crypto. Is there a companion patch series needed so that f2fstools can check/repair a file system with metadata encryption enabled?

Re: [PATCH] fs: ext4: remove unnecessary wbc parameter from ext4_bio_write_page

2020-12-16 Thread Theodore Y. Ts'o
On Fri, Dec 11, 2020 at 02:54:24PM +0800, chenle...@gmail.com wrote: > From: Lei Chen > > ext4_bio_write_page does not need wbc parameter, since its parameter > io contains the io_wbc field. The io::io_wbc is initialized by > ext4_io_submit_init which is called in ext4_writepages and >

Re: [PATCH 031/141] ext4: Fix fall-through warnings for Clang

2020-12-16 Thread Theodore Y. Ts'o
On Fri, Nov 20, 2020 at 12:28:32PM -0600, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > by explicitly adding a break statement instead of just letting the code > fall through to the next case. > > Link:

Re: [PATCH] ext4: fix -Wstringop-truncation warnings

2020-12-15 Thread Theodore Y. Ts'o
On Thu, Nov 12, 2020 at 05:33:24PM +0800, Kang Wenlin wrote: > From: Wenlin Kang > > The strncpy() function may create a unterminated string, > use strscpy_pad() instead. > > This fixes the following warning: > > fs/ext4/super.c: In function '__save_error_info': > fs/ext4/super.c:349:2:

Re: UBSAN: shift-out-of-bounds in ext4_fill_super

2020-12-14 Thread Theodore Y. Ts'o
(Dropping off-topic lists) On Mon, Dec 14, 2020 at 03:37:37PM +0100, Dmitry Vyukov wrote: > > It's going to make everyone else's tags who pull from ext4.git messy, > > though, with gobs of tags that probably won't be of use to them. It > > does avoid the need to use git fetch --tags --force, and

Re: UBSAN: shift-out-of-bounds in ext4_fill_super

2020-12-10 Thread Theodore Y. Ts'o
On Thu, Dec 10, 2020 at 09:09:51AM +0100, Dmitry Vyukov wrote: > > * [new tag] ext4-for-linus-5.8-rc1-2 -> > > ext4-for-linus-5.8-rc1-2 > > ! [rejected] ext4_for_linus -> ext4_for_linus > > (would clobber existing tag) > > Interesting. First time

Re: UBSAN: shift-out-of-bounds in ext4_fill_super

2020-12-09 Thread Theodore Y. Ts'o
On Tue, Dec 08, 2020 at 11:33:11PM -0800, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:15ac8fdb Add linux-next specific files for 20201207 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=1125c92350 > kernel

Re: Pass modules to Linux kernel without initrd

2020-12-08 Thread Theodore Y. Ts'o
On Tue, Dec 08, 2020 at 10:24:08AM +0100, Paul Menzel wrote: > Dear Linux folks, > > Trying to reduce the boot time of standard distributions, I would like to > get rid of the initrd. The initrd is for mounting the root file system and > on most end user systems with standard distributions that

Re: Why the auxiliary cipher in gss_krb5_crypto.c?

2020-12-04 Thread Theodore Y. Ts'o
On Fri, Dec 04, 2020 at 02:59:35PM +, David Howells wrote: > Hi Chuck, Bruce, > > Why is gss_krb5_crypto.c using an auxiliary cipher? For reference, the > gss_krb5_aes_encrypt() code looks like the attached. > > From what I can tell, in AES mode, the difference between the main cipher and >

Re: [PATCH V2] uapi: fix statx attribute value overlap for DAX & MOUNT_ROOT

2020-12-04 Thread Theodore Y. Ts'o
On Thu, Dec 03, 2020 at 08:18:23AM +0200, Amir Goldstein wrote: > Here is a recent example, where during patch review, I requested NOT to > include > any stable backport triggers [1]: > "...We should consider sending this to stable, but maybe let's merge > first and let it > run in master for a

Re: [Ksummit-discuss] crediting bug reports and fixes folded into original patch

2020-12-03 Thread Theodore Y. Ts'o
On Thu, Dec 03, 2020 at 12:43:52AM +0100, Vlastimil Babka wrote: > > there was a bit of debate on Twitter about this, so I thought I would bring it > here. Imagine a scenario where patch sits as a commit in -next and there's a > bug > report or fix, possibly by a bot or with some static

Re: [PATCH v3] Updated locking documentation for transaction_t

2020-12-03 Thread Theodore Y. Ts'o
On Thu, Dec 03, 2020 at 03:38:40PM +0100, Alexander Lochmann wrote: > > > On 03.12.20 15:04, Theodore Y. Ts'o wrote: > > On Thu, Oct 15, 2020 at 03:26:28PM +0200, Alexander Lochmann wrote: > > > Hi folks, > > > > > > I've updated the l

Re: [PATCH][next] ext4: remove redundant assignment of variable ex

2020-12-03 Thread Theodore Y. Ts'o
On Wed, Oct 21, 2020 at 02:23:26PM +0100, Colin King wrote: > From: Colin Ian King > > Variable ex is assigned a variable that is not being read, the assignment > is redundant and can be removed. > > Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King Thanks, applied.

Re: [PATCH] ext4: remove the null check of bio_vec page

2020-12-03 Thread Theodore Y. Ts'o
On Wed, Oct 21, 2020 at 12:25:03PM +0200, Jan Kara wrote: > On Tue 20-10-20 16:22:01, Xianting Tian wrote: > > bv_page can't be NULL in a valid bio_vec, so we can remove the NULL check, > > as we did in other places when calling bio_for_each_segment_all() to go > > through all bio_vec of a bio. >

Re: [PATCH v3] Updated locking documentation for transaction_t

2020-12-03 Thread Theodore Y. Ts'o
On Thu, Oct 15, 2020 at 03:26:28PM +0200, Alexander Lochmann wrote: > Hi folks, > > I've updated the lock documentation according to our finding for > transaction_t. > Does this patch look good to you? I updated the annotations to match with the local usage, e.g: * When commit was

Re: [PATCH v7 6/8] ext4: support direct I/O with fscrypt using blk-crypto

2020-12-03 Thread Theodore Y. Ts'o
On Tue, Nov 17, 2020 at 02:07:06PM +, Satya Tangirala wrote: > From: Eric Biggers > > Wire up ext4 with fscrypt direct I/O support. Direct I/O with fscrypt is > only supported through blk-crypto (i.e. CONFIG_BLK_INLINE_ENCRYPTION must > have been enabled, the 'inlinecrypt' mount option must

Re: [PATCH v9 2/2] fs: ext4: Modify inode-test.c to use KUnit parameterized testing feature

2020-12-02 Thread Theodore Y. Ts'o
On Mon, Nov 16, 2020 at 11:11:50AM +0530, Arpitha Raghunandan wrote: > Modify fs/ext4/inode-test.c to use the parameterized testing > feature of KUnit. > > Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> > Signed-off-by: Marco Elver Acked-by: Theodore Ts'o

Re: [PATCH v9 1/2] kunit: Support for Parameterized Testing

2020-12-02 Thread Theodore Y. Ts'o
On Mon, Nov 30, 2020 at 02:22:22PM -0800, 'Brendan Higgins' via KUnit Development wrote: > > Looks good to me. I would definitely like to pick this up. But yeah, > in order to pick up 2/2 we will need an ack from either Ted or Iurii. > > Ted seems to be busy right now, so I think I will just

Re: drivers/char/random.c needs a (new) maintainer

2020-11-30 Thread Theodore Y. Ts'o
On Mon, Nov 30, 2020 at 04:15:23PM +0100, Jason A. Donenfeld wrote: > I am willing to maintain random.c and have intentions to have a > formally verified RNG. I've mentioned this to Ted before. > > But I think Ted's reluctance to not accept the recent patches sent to > this list is mostly

[GIT PULL] ext4 bug fixes for 5.10-rc

2020-11-22 Thread Theodore Y. Ts'o
The following changes since commit 09162bc32c880a791c6c0668ce0745cf7958f576: Linux 5.10-rc4 (2020-11-15 16:44:31 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git tags/ext4_for_linus_fixes2 for you to fetch changes up to

Re: [PATCH v4 12/27] jbd2: fix kernel-doc markups

2020-11-19 Thread Theodore Y. Ts'o
On Mon, Nov 16, 2020 at 11:18:08AM +0100, Mauro Carvalho Chehab wrote: > Kernel-doc markup should use this format: > identifier - description > > They should not have any type before that, as otherwise > the parser won't do the right thing. > > Also, some identifiers have different names

Re: [RESEND][PATCH] ima: Set and clear FMODE_CAN_READ in ima_calc_file_hash()

2020-11-17 Thread Theodore Y. Ts'o
On Tue, Nov 17, 2020 at 10:23:58AM -0800, Linus Torvalds wrote: > On Mon, Nov 16, 2020 at 10:35 AM Mimi Zohar wrote: > > > > We need to differentiate between signed files, which by definition are > > immutable, and those that are mutable. Appending to a mutable file, > > for example, would

Re: [PATCH v2 1/3] libfs: Add generic function for setting dentry_ops

2020-11-17 Thread Theodore Y. Ts'o
On Tue, Nov 17, 2020 at 04:03:13AM +, Daniel Rosenberg wrote: > This adds a function to set dentry operations at lookup time that will > work for both encrypted filenames and casefolded filenames. > > A filesystem that supports both features simultaneously can use this > function during

Re: [PATCH v2 2/3] fscrypt: Have filesystems handle their d_ops

2020-11-17 Thread Theodore Y. Ts'o
On Tue, Nov 17, 2020 at 09:04:11AM -0800, Jaegeuk Kim wrote: > > I'd like to pick this patch series in f2fs/dev for -next, so please let me > know > if you have any concern. No concern for me as far as ext4 is concerned, thanks! - Ted

Re: [PATCH v7 0/8] add support for direct I/O with fscrypt using blk-crypto

2020-11-17 Thread Theodore Y. Ts'o
What is the expected use case for Direct I/O using fscrypt? This isn't a problem which is unique to fscrypt, but one of the really unfortunate aspects of the DIO interface is the silent fallback to buffered I/O. We've lived with this because DIO goes back decades, and the original use case was

Re: [PATCH v2 2/3] fscrypt: Have filesystems handle their d_ops

2020-11-17 Thread Theodore Y. Ts'o
On Tue, Nov 17, 2020 at 04:03:14AM +, Daniel Rosenberg wrote: > This shifts the responsibility of setting up dentry operations from > fscrypt to the individual filesystems, allowing them to have their own > operations while still setting fscrypt's d_revalidate as appropriate. > > Most

[GIT PULL] more ext4 fixes for v5.10-rc4

2020-11-12 Thread Theodore Y. Ts'o
The following changes since commit 52d1998d09af92d44ffce7454637dd3fd1afdc7d: Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt (2020-11-10 10:05:37 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git

Re: How to enable auto-suspend by default

2020-11-10 Thread Theodore Y. Ts'o
One note... I'll double check, but on my XPS 13 9380, as I recall, I have to manually disable autosuspend on all of the XHCI controllers and internal hubs after running "powertop --auto-tune", or else any external mouse attached to said USB device will be dead to the world for 2-3 seconds if the

Re: [PATCH 0/2] Tristate moount option comatibility fixup

2020-11-10 Thread Theodore Y. Ts'o
On Mon, Nov 09, 2020 at 08:10:07PM +0100, Michal Suchanek wrote: > Hello, > > after the tristate dax option change some applications fail to detect > pmem devices because the dax option no longer shows in mtab when device > is mounted with -o dax. Which applications? Name them. We *really*

[GIT PULL] ext4 cleanups for 5.10-rc4

2020-11-09 Thread Theodore Y. Ts'o
(Resent with missing cc's, sorry.) The following changes since commit 3cea11cd5e3b00d91caf0b4730194039b45c5891: Linux 5.10-rc2 (2020-11-01 14:43:51 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git tags/ext4_for_linus_cleanups for

Re: [PATCH] MAINTAINERS: add missing file in ext4 entry

2020-11-06 Thread Theodore Y. Ts'o
On Fri, Oct 30, 2020 at 10:24:35AM +0800, Chao Yu wrote: > include/trace/events/ext4.h belongs to ext4 module, add the file path into > ext4 entry in MAINTAINERS. > > Signed-off-by: Chao Yu Thanks, applied. - Ted

Re: [PATCH] ext4: Use generic casefolding support

2020-10-29 Thread Theodore Y. Ts'o
On Wed, Oct 28, 2020 at 05:08:20AM +, Daniel Rosenberg wrote: > This switches ext4 over to the generic support provided in libfs. > > Since casefolded dentries behave the same in ext4 and f2fs, we decrease > the maintenance burden by unifying them, and any optimizations will > immediately

GIT PULL] ext4 fixes for 5.10-rc2

2020-10-29 Thread Theodore Y. Ts'o
The following changes since commit 96485e4462604744d66bf4301557d996d80b85eb: Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 (2020-10-22 10:31:08 -0700) are available in the Git repository at:

Re: [PATCH] ext4: properly check for dirty state in ext4_inode_datasync_dirty()

2020-10-28 Thread Theodore Y. Ts'o
On Wed, Oct 28, 2020 at 08:57:03AM +0530, Ritesh Harjani wrote: > > Well, I too noticed this yesterday while I was testing xfstests -g swap. > Those tests were returning _notrun, hence that could be the reason why > it didn't get notice in XFSTESTing from Ted. Yeah, one of the things I discussed

Re: [PATCH v3 23/32] jbd2: fix a kernel-doc markup

2020-10-27 Thread Theodore Y. Ts'o
On Tue, Oct 27, 2020 at 10:51:27AM +0100, Mauro Carvalho Chehab wrote: > The kernel-doc markup that documents _fc_replay_callback is > missing an asterisk, causing this warning: > > ../include/linux/jbd2.h:1271: warning: Function parameter or member > 'j_fc_replay_callback' not described

Re: PROBLEM: Reiser4 hard lockup

2020-10-27 Thread Theodore Y. Ts'o
On Tue, Oct 27, 2020 at 01:53:31AM +0100, Edward Shishkin wrote: > > > reiser4progs 1.1.x Software Framework Release Number (SFRN) 4.0.1 file > > > system utilities should not be used to check/fix media formatted 'a > > > priori' in SFRN 4.0.2 and vice-versa. > > > > Honestly, this is the first

Re: [RFC] Removing b_end_io

2020-10-25 Thread Theodore Y. Ts'o
On Sun, Oct 25, 2020 at 04:44:38AM +, Matthew Wilcox wrote: > @@ -3068,6 +3069,12 @@ static int submit_bh_wbc(int op, int op_flags, struct > buffer_head *bh, > } > > submit_bio(bio); > +} > + > +static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh, > +

Re: [PATCH] ext: EXT4_KUNIT_TESTS should depend on EXT4_FS instead of selecting it

2020-10-23 Thread Theodore Y. Ts'o
On Thu, Oct 22, 2020 at 04:52:52PM -0700, Brendan Higgins wrote: > So you, me, Luis, David, and a whole bunch of other people have been > thinking about this problem for a while. What if we just put > kunitconfig fragments in directories along side the test files they > enable? > > For example,

[GIT PULL] ext4 changes for 5.10

2020-10-22 Thread Theodore Y. Ts'o
The following changes since commit a1b8638ba1320e6684aa98233c15255eb803fac7: Linux 5.9-rc7 (2020-09-27 14:38:10 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git tags/ext4_for_linus for you to fetch changes up to

Re: [PATCH] ext: EXT4_KUNIT_TESTS should depend on EXT4_FS instead of selecting it

2020-10-21 Thread Theodore Y. Ts'o
On Wed, Oct 21, 2020 at 04:07:15PM -0700, Randy Dunlap wrote: > > I'm don't particularly care how this gets achieved, but please think > > about how to make it easy for a kernel developer to run a specific set > > of subsystem unit tests. (In fact, being able to do something like > > "kunit.py

Re: [PATCH] ext: EXT4_KUNIT_TESTS should depend on EXT4_FS instead of selecting it

2020-10-21 Thread Theodore Y. Ts'o
On Wed, Oct 21, 2020 at 02:16:56PM -0700, Randy Dunlap wrote: > On 10/21/20 2:15 PM, Brendan Higgins wrote: > > On Tue, Oct 20, 2020 at 12:37 AM Geert Uytterhoeven > > wrote: > >> > >> EXT4_KUNIT_TESTS selects EXT4_FS, thus enabling an optional feature the > >> user may not want to enable. Fix

Re: ext4 regression in v5.9-rc2 from e7bfb5c9bb3d on ro fs with overlapped bitmaps

2020-10-09 Thread Theodore Y. Ts'o
On Thu, Oct 08, 2020 at 03:22:59PM -0700, Josh Triplett wrote: > > I wasn't trying to make a *new* general principle or policy. I was under > the impression that this *was* the policy, because it never occurred to > me that it could be otherwise. It seemed like a natural aspect of the >

Re: ext4 regression in v5.9-rc2 from e7bfb5c9bb3d on ro fs with overlapped bitmaps

2020-10-07 Thread Theodore Y. Ts'o
On Wed, Oct 07, 2020 at 01:14:24PM -0700, Josh Triplett wrote: > > That sounds like a conversation that would have been a lot more > interesting and enjoyable if it hadn't started with "can we shoot it in > the head", and continued with the notion that anything other than > e2fsprogs making

Re: [PATCH] ext4/xfs: add page refcount helper

2020-10-07 Thread Theodore Y. Ts'o
On Tue, Oct 06, 2020 at 07:40:05PM -0700, Dan Williams wrote: > On Tue, Oct 6, 2020 at 4:09 PM Ralph Campbell wrote: > > > > There are several places where ZONE_DEVICE struct pages assume a reference > > count == 1 means the page is idle and free. Instead of open coding this, > > add a helper

Re: ext4 regression in v5.9-rc2 from e7bfb5c9bb3d on ro fs with overlapped bitmaps

2020-10-07 Thread Theodore Y. Ts'o
On Wed, Oct 07, 2020 at 01:03:04AM -0700, Josh Triplett wrote: > > But can we *please* take your custom tool out back and shoot it in the > > head? > > Nope. As mentioned, this isn't about creating ext4 filesystem images, > and it isn't even remotely similar to mke2fs. Can you please tell us

Re: ext4 regression in v5.9-rc2 from e7bfb5c9bb3d on ro fs with overlapped bitmaps

2020-10-06 Thread Theodore Y. Ts'o
On Mon, Oct 05, 2020 at 10:03:06PM -0700, Josh Triplett wrote: > > I'm not trying to create a problem here; I'm trying to address a whole > family of problems. I was generally under the impression that mounting > existing root filesystems fell under the scope of the kernel<->userspace > or

Re: ext4 regression in v5.9-rc2 from e7bfb5c9bb3d on ro fs with overlapped bitmaps

2020-10-05 Thread Theodore Y. Ts'o
On Mon, Oct 05, 2020 at 07:51:10PM -0700, Darrick J. Wong wrote: > > > Could /somebody/ please document the ondisk format changes that are > > > associated with this feature? > > > > I pretty much had to sort it out by looking at a combination of > > e2fsprogs and the kernel, and a lot of

Re: ext4 regression in v5.9-rc2 from e7bfb5c9bb3d on ro fs with overlapped bitmaps

2020-10-05 Thread Theodore Y. Ts'o
On Mon, Oct 05, 2020 at 10:36:39AM -0700, Darrick J. Wong wrote: > > Commit e7bfb5c9bb3d ("ext4: handle add_system_zone() failure in > > ext4_setup_system_zone()") breaks mounting of read-only ext4 filesystems > > with intentionally overlapping bitmap blocks. > > > > On an always-read-only

Re: [PATCH] FIX the comment of struct jbd2_journal_handle

2020-10-02 Thread Theodore Y. Ts'o
On Wed, Sep 23, 2020 at 01:12:31AM +0800, Hui Su wrote: > the struct name was modified long ago, but the comment still > use struct handle_s. > > Signed-off-by: Hui Su Tnanks, applied. I updated the commit summary to be: jbd2: fix the comment of struct jbd2_journal_handle

Re: [PATCH] ext4: fix leaking sysfs kobject after failed mount

2020-10-02 Thread Theodore Y. Ts'o
On Thu, Sep 24, 2020 at 11:08:59AM +0200, Jan Kara wrote: > On Tue 22-09-20 09:24:56, Eric Biggers wrote: > > From: Eric Biggers > > > > ext4_unregister_sysfs() only deletes the kobject. The reference to it > > needs to be put separately, like ext4_put_super() does. > > > > This addresses the

Re: [PATCHv3 1/1] ext4: Optimize file overwrites

2020-10-02 Thread Theodore Y. Ts'o
On Fri, Sep 18, 2020 at 10:36:35AM +0530, Ritesh Harjani wrote: > In case if the file already has underlying blocks/extents allocated > then we don't need to start a journal txn and can directly return > the underlying mapping. Currently ext4_iomap_begin() is used by > both DAX & DIO path. We can

Re: [PATCH] [v2] ext4: Fix error handling code in add_new_gdb

2020-10-02 Thread Theodore Y. Ts'o
On Sat, Aug 29, 2020 at 10:54:02AM +0800, Dinghao Liu wrote: > When ext4_journal_get_write_access() fails, we should > terminate the execution flow and release n_group_desc, > iloc.bh, dind and gdb_bh. > > Signed-off-by: Dinghao Liu Thanks, applied. - Ted

Re: [PATCHv2 1/3] ext4: Refactor ext4_overwrite_io() to take ext4_map_blocks as argument

2020-10-02 Thread Theodore Y. Ts'o
On Sat, Aug 22, 2020 at 05:04:35PM +0530, Ritesh Harjani wrote: > Refactor ext4_overwrite_io() to take struct ext4_map_blocks > as it's function argument with m_lblk and m_len filled > from caller > > There should be no functionality change in this patch. > > Signed-off-by: Ritesh Harjani > ---

Re: [PATCH] ext4: flag as supporting buffered async reads

2020-10-02 Thread Theodore Y. Ts'o
On Mon, Aug 03, 2020 at 05:02:11PM -0600, Jens Axboe wrote: > ext4 uses generic_file_read_iter(), which already supports this. > > Cc: Theodore Ts'o > Signed-off-by: Jens Axboe Applied, thanks. (And apologies for the delay.) - Ted

Re: [DISCUSSION PATCH 00/41] random: possible ways towards NIST SP800-90B compliance

2020-10-02 Thread Theodore Y. Ts'o
On Fri, Oct 02, 2020 at 03:39:35PM +, Van Leeuwen, Pascal wrote: > > Then your company can not contribute in Linux kernel development, as > > this is obviously not allowed by such a footer. > > > Interesting, this has never been raised as a problem until today ... > Going back through my mail

Re: REGRESSION: 37f4a24c2469: blk-mq: centralise related handling into blk_mq_get_driver_tag

2020-09-27 Thread Theodore Y. Ts'o
On Fri, Sep 25, 2020 at 02:18:48PM -0700, Shakeel Butt wrote: > > Yes, you are right. Let's first get this patch tested and after > confirmation we can update the commit message. Thanks Shakeel! I've tested your patch, as well as reverting the three commits that Linus had suggested, and both

Re: REGRESSION: 37f4a24c2469: blk-mq: centralise related handling into blk_mq_get_driver_tag

2020-09-24 Thread Theodore Y. Ts'o
On Thu, Sep 24, 2020 at 10:33:45AM -0400, Theodore Y. Ts'o wrote: > HOWEVER, thanks to a hint from a colleague at $WORK, and realizing > that one of the stack traces had virtio balloon in the trace, I > realized that when I switched the GCE VM type from e1-standard-2 to > n1-standard

Re: [PATCH] ext4: Implement swap_activate aops using iomap

2020-09-24 Thread Theodore Y. Ts'o
On Fri, Sep 04, 2020 at 02:46:53PM +0530, Ritesh Harjani wrote: > After moving ext4's bmap to iomap interface, swapon functionality > on files created using fallocate (which creates unwritten extents) are > failing. This is since iomap_bmap interface returns 0 for unwritten > extents and thus

Re: REGRESSION: 37f4a24c2469: blk-mq: centralise related handling into blk_mq_get_driver_tag

2020-09-24 Thread Theodore Y. Ts'o
On Thu, Sep 24, 2020 at 08:59:01AM +0800, Ming Lei wrote: > > The list corruption issue can be reproduced on kvm/qumu guest too when > running xfstests(ext4) generic/038. > > However, the issue may become not reproduced when adding or removing memory > debug options, such as adding KASAN. Can

Re: [PATCH] random: initialize ChaCha20 constants with correct endianness

2020-09-18 Thread Theodore Y. Ts'o
On Tue, Sep 15, 2020 at 09:50:13PM -0700, Eric Biggers wrote: > From: Eric Biggers > > On big endian CPUs, the ChaCha20-based CRNG is using the wrong > endianness for the ChaCha20 constants. > > This doesn't matter cryptographically, but technically it means it's not > ChaCha20 anymore. Fix it

Re: [PATCH AUTOSEL 4.19 059/206] ext4: make dioread_nolock the default

2020-09-18 Thread Theodore Y. Ts'o
On Thu, Sep 17, 2020 at 07:58:59PM -0700, Eric Biggers wrote: > On Thu, Sep 17, 2020 at 10:05:35PM -0400, Sasha Levin wrote: > > From: Theodore Ts'o > > > > [ Upstream commit 244adf6426ee31a83f397b700d964cff12a247d3 ] > > > > This fixes the direct I/O versus writeback race which can reveal

Re: REGRESSION: 37f4a24c2469: blk-mq: centralise related handling into blk_mq_get_driver_tag

2020-09-17 Thread Theodore Y. Ts'o
On Thu, Sep 17, 2020 at 10:20:51AM +0800, Ming Lei wrote: > > Obviously there is other more serious issue, since 568f27006577 is > completely reverted in your test, and you still see list corruption > issue. > > So I'd suggest to find the big issue first. Once it is fixed, maybe > everything

Re: REGRESSION: 37f4a24c2469: blk-mq: centralise related handling into blk_mq_get_driver_tag

2020-09-16 Thread Theodore Y. Ts'o
On Wed, Sep 16, 2020 at 07:09:41AM +0800, Ming Lei wrote: > > The problem is it's a bit tricky to revert 568f27006577, since there > > is a merge conflict in blk_kick_flush(). I attempted to do the bisect > > manually here, but it's clearly not right since the kernel is not > > booting after the

Re: REGRESSION: 37f4a24c2469: blk-mq: centralise related handling into blk_mq_get_driver_tag

2020-09-15 Thread Theodore Y. Ts'o
On Tue, Sep 15, 2020 at 03:33:03PM +0800, Ming Lei wrote: > Hi Theodore, > > On Tue, Sep 15, 2020 at 12:45:19AM -0400, Theodore Y. Ts'o wrote: > > On Thu, Sep 03, 2020 at 11:55:28PM -0400, Theodore Y. Ts'o wrote: > > > Worse, right now, -rc1 and -rc2 is causing random

REGRESSION: 37f4a24c2469: blk-mq: centralise related handling into blk_mq_get_driver_tag

2020-09-14 Thread Theodore Y. Ts'o
On Thu, Sep 03, 2020 at 11:55:28PM -0400, Theodore Y. Ts'o wrote: > Worse, right now, -rc1 and -rc2 is causing random crashes in my > gce-xfstests framework. Sometimes it happens before we've run even a > single xfstests; sometimes it happens after we have successfully > c

Re: [PATCH] ext4: flag as supporting buffered async reads

2020-09-03 Thread Theodore Y. Ts'o
e: > >> On 8/24/20 4:56 AM, Jens Axboe wrote: > >>> On 8/22/20 9:48 AM, Jens Axboe wrote: > >>>> On 8/22/20 8:33 AM, Theodore Y. Ts'o wrote: > >>>>> On Fri, Aug 21, 2020 at 03:26:35PM -0600, Jens Axboe wrote: > &g

Re: [PATCH] ext4: flag as supporting buffered async reads

2020-08-22 Thread Theodore Y. Ts'o
On Fri, Aug 21, 2020 at 03:26:35PM -0600, Jens Axboe wrote: > >>> Resending this one, as I've been carrying it privately since May. The > >>> necessary bits are now upstream (and XFS/btrfs equiv changes as well), > >>> please consider this one for 5.9. Thanks! > >> > >> The necessary commit only

Re: [LKP] Re: [ext4] d3b6f23f71: stress-ng.fiemap.ops_per_sec -60.5% regression

2020-08-19 Thread Theodore Y. Ts'o
Looking at what the stress-ng fiemap workload is doing, and it's interesting. It is running 4 processes which are calling FIEMAP on a particular file in a loop, with a 25ms sleep every 64 times. And then there is a fifth process which is randomly writing to the file and calling punch_hole to

Re: [PATCH] ext4: Fix comment typo "the the".

2020-08-18 Thread Theodore Y. Ts'o
On Sat, Apr 25, 2020 at 02:16:24AM +0900, kyoungho koo wrote: > I have found double typed comments "the the". So i modified it to > one "the" > > Signed-off-by: kyoungho koo Thanks, applied; apologies for this falling through the cracks! - Ted

Re: [PATCH] mballoc: Replace seq_printf with seq_puts

2020-08-18 Thread Theodore Y. Ts'o
On Mon, Aug 10, 2020 at 02:21:58AM +, Xu Wang wrote: > seq_puts is a lot cheaper than seq_printf, so use that to print > literal strings. > > Signed-off-by: Xu Wang Applied, thanks. - Ted

Re: [PATCH] ext4: flag as supporting buffered async reads

2020-08-18 Thread Theodore Y. Ts'o
On Mon, Aug 03, 2020 at 05:02:11PM -0600, Jens Axboe wrote: > ext4 uses generic_file_read_iter(), which already supports this. > > Cc: Theodore Ts'o > Signed-off-by: Jens Axboe > > --- > > Resending this one, as I've been carrying it privately since May. The > necessary bits are now upstream

Re: Maintainers / Kernel Summit 2020 planning kick-off

2020-07-01 Thread Theodore Y. Ts'o
On Wed, Jul 01, 2020 at 09:12:31AM +1000, Dave Airlie wrote: > > What timezone are the conferences being held in? It impacts on what I > can attend quite heavily :-) When you register for the Linux Plumbers Conference, there will be an opportunity for you to indicate your timezone preferences.

Maintainers / Kernel Summit 2020 submissions

2020-06-15 Thread Theodore Y. Ts'o
So far, we have received 5 techinical topic submissions for the Kernel Summit; thanks to those who have submitted. If you have some additional ideas of technical topics you'd like to discuss at the Kernel Summit, please submit them this week. For details on how to proposal a topic for the Kernel

[GIT PULL] ext4 changes part 2 for 5.8

2020-06-14 Thread Theodore Y. Ts'o
The following changes since commit 6b8ed62008a49751fc71fefd2a4f89202a7c2d4d: ext4: avoid unnecessary transaction starts during writeback (2020-06-03 23:16:56 -0400) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git

Re: [PATCH v2] ext4: support xattr gnu.* namespace for the Hurd

2020-06-12 Thread Theodore Y. Ts'o
On Fri, May 29, 2020 at 10:39:39AM +0200, Jan Nieuwenhuizen wrote: > Theodore Y. Ts'o writes: > > Hello! > > > On Mon, May 25, 2020 at 09:39:40PM +0200, Jan (janneke) Nieuwenhuizen wrote: > >> The Hurd gained[0] support for moving the translator and author &

Re: BUG: unable to handle kernel NULL pointer dereference in generic_perform_write (2)

2020-06-10 Thread Theodore Y. Ts'o
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git 5749fe5af3db176659978718ddaecebb450cdb6b

Re: BUG: unable to handle kernel NULL pointer dereference in generic_perform_write (2)

2020-06-10 Thread Theodore Y. Ts'o
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git 5b8b9d0c6d0e0f1993c6c56deaf9646942c49d94

Re: BUG: unable to handle kernel NULL pointer dereference in generic_perform_write (2)

2020-06-10 Thread Theodore Y. Ts'o
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5b8b9d0c6d0e0f1993c6c56deaf9646942c49d94

[GIT PULL] ext4 changes for 5.8-rc1

2020-06-04 Thread Theodore Y. Ts'o
The following changes since commit 0e698dfa282211e414076f9dc7e83c1c288314fd: Linux 5.7-rc4 (2020-05-03 14:56:04 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git tags/ext4_for_linus for you to fetch changes up to

Re: [PATCH V5 0/9] Enable ext4 support for per-file/directory DAX operations

2020-05-28 Thread Theodore Y. Ts'o
On Thu, May 28, 2020 at 10:54:41PM -0400, Theodore Y. Ts'o wrote: > > Thanks, applied to the ext4-dax branch. > I spoke too soon. While I tried merging with the ext4.git dev branch, a merge conflict made me look closer and I realize I needed to make the following changes (see diff bet

Re: [PATCH v2] ext4: support xattr gnu.* namespace for the Hurd

2020-05-28 Thread Theodore Y. Ts'o
On Mon, May 25, 2020 at 09:39:40PM +0200, Jan (janneke) Nieuwenhuizen wrote: > The Hurd gained[0] support for moving the translator and author > fields out of the inode and into the "gnu.*" xattr namespace. > > In anticipation of that, an xattr INDEX was reserved[1]. The Hurd has > now been

Re: [PATCH V5 0/9] Enable ext4 support for per-file/directory DAX operations

2020-05-28 Thread Theodore Y. Ts'o
.404144-1-ira.we...@intel.com/ > > To: linux-e...@vger.kernel.org > To: Andreas Dilger > To: "Theodore Y. Ts'o" > To: Jan Kara > To: Eric Biggers Thanks, applied to the ext4-dax branch. - Ted

Re: [PATCHv5 0/5] Improve ext4 handling of ENOSPC with multi-threaded use-case

2020-05-28 Thread Theodore Y. Ts'o
Thanks, I've applied this patch series. - Ted

Re: [PATCH] ext4: Fix a typo in a comment

2020-05-21 Thread Theodore Y. Ts'o
On Sun, May 03, 2020 at 10:06:47PM +0200, Christophe JAILLET wrote: > s/extnets/extents/ > > Signed-off-by: Christophe JAILLET Thanks, applied. - Ted

Maintainers / Kernel Summit 2020 planning kick-off

2020-05-15 Thread Theodore Y. Ts'o
[ Feel free to forward this to other Linux kernel mailing lists as appropriate -- Ted ] This year, the Maintainers and Kernel Summit will NOT be held in Halifax, August 25 -- 28th, as a result of the COVID-19 pandemic. Instead, we will be pursuing a virtual conference format for both the

Re: [PATCH] ext4: Fix buffer_head refcnt leak when ext4_iget() fails

2020-05-14 Thread Theodore Y. Ts'o
On Thu, Apr 23, 2020 at 01:09:27PM +0800, Xiyu Yang wrote: > ext4_orphan_get() invokes ext4_read_inode_bitmap(), which returns a > reference of the specified buffer_head object to "bitmap_bh" with > increased refcnt. > > When ext4_orphan_get() returns, local variable "bitmap_bh" becomes >

Re: [PATCH] ext4: remove unnecessary comparisons to bool

2020-05-14 Thread Theodore Y. Ts'o
On Mon, Apr 20, 2020 at 12:29:18PM +0800, Jason Yan wrote: > Fix the following coccicheck warning: > > fs/ext4/extents_status.c:1057:5-28: WARNING: Comparison to bool > fs/ext4/inode.c:2314:18-24: WARNING: Comparison to bool > > Signed-off-by: Jason Yan Applied, thanks.

Re: [PATCH v3 5/6] fs: ext4: default KUNIT_* fragments to KUNIT_ALL_TESTS

2020-05-11 Thread Theodore Y. Ts'o
On Mon, May 11, 2020 at 03:14:38PM +0200, Anders Roxell wrote: > This makes it easier to enable all KUnit fragments. > > Adding 'if !KUNIT_ALL_TESTS' so individual tests can not be turned off. > Therefore if KUNIT_ALL_TESTS is enabled that will hide the prompt in > menuconfig. > > Reviewed-by:

Re: [PATCH linux-kselftest/test v1] apparmor: add AppArmor KUnit tests for policy unpack

2019-10-18 Thread Theodore Y. Ts'o
On Thu, Oct 17, 2019 at 05:43:07PM -0700, Brendan Higgins wrote: > > +config SECURITY_APPARMOR_TEST > > + bool "Build KUnit tests for policy_unpack.c" > > + default n > > + depends on KUNIT && SECURITY_APPARMOR > > Ted, here is an example where doing select on direct dependencies is >

Re: [REGRESSION] kmemleak: commit c566586818 causes failure to boot

2019-10-14 Thread Theodore Y. Ts'o
On Mon, Oct 14, 2019 at 01:51:15PM +0100, Catalin Marinas wrote: > In your case, CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y, so it disables itself > irrespective of the pool size and trips over the bug. Even with default > off, it still involves the clean-up since kmemleak needs to track early >

Re: [REGRESSION] kmemleak: commit c566586818 causes failure to boot

2019-10-14 Thread Theodore Y. Ts'o
On Mon, Oct 14, 2019 at 08:03:14AM +0100, Catalin Marinas wrote: > Thanks for the report. I have a fix already: > > http://lkml.kernel.org/r/20191004134624.46216-1-catalin.mari...@arm.com > > I was hoping Andrew had sent it to Linus before -rc3 but it doesn't seem > to be in mainline yet.

[REGRESSION] kmemleak: commit c566586818 causes failure to boot

2019-10-13 Thread Theodore Y. Ts'o
Commit c566586818 ("mm: kmemleak: use the memory pool for early allocations") causes my test kernels to fail to boot on using both kvm and using Google Compute Engine. A git bisect localized it to c566586818, and I confirmed by test building v5.4-rc3, which failed as above using KVM. When I

Re: x86/random: Speculation to the rescue

2019-10-07 Thread Theodore Y. Ts'o
On Sun, Oct 06, 2019 at 08:21:03PM +0200, Pavel Machek wrote: > Even without cycle counter... if we _know_ we are trying to generate > entropy and have MMC available, we don't care about power and > performance. > > So we can just... > >issue read request on MMC >while (!interrupt_done)

Re: Stop breaking the CSRNG

2019-10-02 Thread Theodore Y. Ts'o
On Wed, Oct 02, 2019 at 06:55:33PM +0200, Kurt Roeckx wrote: > > But it seems people are now thinking about breaking getrandom() too, > to let it return data when it's not initialized by default. Please > don't. "It's complicated" The problem is that whether a CRNG can be considered secure is a

Re: x86/random: Speculation to the rescue

2019-10-02 Thread Theodore Y. Ts'o
On Tue, Oct 01, 2019 at 06:15:02PM +0200, Ahmed S. Darwish wrote: > > Using the "ent" tool, [2] also used to test randomness in the Stephen > Müller LRNG paper, on a 50-byte file, produced the following > results: The "ent" tool is really, really useless. If you take any CRNG, even

  1   2   3   4   5   6   7   8   9   >