On Mon, May 22, 2023 at 06:06:27PM -0700, Darrick J. Wong wrote:
> On Fri, May 19, 2023 at 11:35:16AM +0200, Christoph Hellwig wrote:
> > Move the assignment to current->backing_dev_info from the callers into
> > iomap_file_buffered_write to reduce boiler plate code and reduce the
> > scope to just around the page dirtying loop.
> >
> > Note that zonefs was missing this assignment before.
>
> I'm still wondering (a) what the hell current->backing_dev_info is for,
> and (b) if we need it around the iomap_unshare operation.
>
> $ git grep current..backing_dev_info
[results show it only set, never used]
>
> AFAICT nobody uses it at all? Unless there's some bizarre user that
> isn't extracting it from @current?
>
> Oh, hey, new question (c) isn't this set incorrectly for xfs realtime
> files?
Some git archaelogy ...
This was first introduced in commit 2f45a06517a62 (in the
linux-fullhistory tree) in 2002 by one Andrew Morton. At the time,
it added this check to the page scanner:
+ if (page->pte.direct ||
+ page->mapping->backing_dev_info ==
+ current->backing_dev_info) {
+ wait_on_page_writeback(page);
+ }
AFAICT (the code went through some metamorphoses in the intervening
twenty years), the last use of it ended up in current_may_throttle(),
and it was removed in March 2022 by Neil Brown in commit b9b1335e6403.
Since then, there have been no users of task->backing_dev_info, and I'm
pretty sure it can go away.
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel