lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 16 Nov 2022 16:36:44 +0100 From: Jan Kara <jack@...e.cz> To: Christoph Hellwig <hch@....de> Cc: Theodore Ts'o <tytso@....edu>, Jan Kara <jack@...e.cz>, "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>, Mingming Cao <cmm@...ibm.com>, linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org, ocfs2-devel@....oracle.com, linux-mm@...ck.org Subject: Re: generic_writepages & jbd2 and ext4 On Wed 16-11-22 14:50:16, Christoph Hellwig wrote: > Hi all, > > I've recently started looking into killing off the ->writepage method, > and as an initial subproject kill of external uses of generic_writepages. > One of the two remaining callers s in jbd2 and I'm a bit confused about > it. > > jbd2_journal_submit_inode_data_buffers has two comments that explicitly > ask for ->writepages as that doesn't allocate data: > > /* > * write the filemap data using writepage() address_space_operations. > * We don't do block allocation here even for delalloc. We don't > * use writepages() because with delayed allocation we may be doing > * block allocation in writepages(). > */ > > /* > * submit the inode data buffers. We use writepage > * instead of writepages. Because writepages can do > * block allocation with delalloc. We need to write > * only allocated blocks here. > */ > > and these look really stange to me. ->writepage and ->writepages per > their document VM/VFS semantics don't different on what they allocate, > so this seems to reverse engineer ext4 internal behavior in some > way. Either way looping over ->writepage just for that is rather > inefficient. If jbd2 really wants a way to skip delalloc conversion > can we come up with a flag in struct writeback_control for that? > > Is there anyone familiar enough with this code who would be willing > to give it a try? Yes, I've written that code quite a few years ago :) And I agree JBD2 is abusing internal knowledge about ext4 here. So yes, writeback_control flag so that we can propagate the information to ->writepages method should do the trick. I'll have a look into that. Honza -- Jan Kara <jack@...e.com> SUSE Labs, CR
Powered by blists - more mailing lists