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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6bb74ccc-25e2-45c1-8a88-cfd093a194c7@huawei.com>
Date: Mon, 28 Oct 2024 09:47:46 +0800
From: Zhang Yi <yi.zhang@...wei.com>
To: Theodore Ts'o <tytso@....edu>
CC: "Darrick J. Wong" <djwong@...nel.org>, Ext4 Developers List
	<linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] ext4: fix FS_IOC_GETFSMAP handling

On 2024/10/25 23:42, Theodore Ts'o wrote:
> On Fri, Oct 25, 2024 at 03:06:07PM +0800, Zhang Yi wrote:
>>
>> Now it seems to be able to handle all the necessary metadata in the
>> query range here, can we remove the processing of info->gfi_meta_list
>> in ext4_getfsmap_datadev_helper() as well?
> 
> Not without further code refactoring; we still need it if there are
> metadata blocks in the middle of the block group.

IIRC, at the moment, fixed metadata does not appear in the middle of
the block group.

> My main emphasis
> was keeping the code changes as simple so it would be easy to
> backport, and so I didn't do further optimizations.

OK.

> 
> As a related observation, I'm not entirely sure the current set of
> abstractions, where we pass exactly one set of helper/callback
> functions down through multiple functions is the best match for ext4.
> It should be possible to significantly simplify the call stack by
> reworking the GETFSMAP support.

Yeah, I have the same feeling too.

> 
> On the other hand, the current, more complicated design might be
> useful if at some point in the future, we were to add support for
> reverse mapping for online fsck and/or if we add reflink support.
> (See how Darrick implemented GETFSMAP for xfs.)
> 

Yes, the current GETFSMAP implementation on ext4 is incomplete and
has many limitations. If we had reserved mapping, we could achieve
more; for example, we could accurately query the inode to which a
block belongs, and the query efficiency would improve. As Baokun
mentioned earlier, we will take the time to look into the reverse
mapping first to hope to support it and maybe online fsck in the
future.

Thanks,
Yi.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ