Page MenuHomeFreeBSD

ufs: ufs_bmap_seekdata() needs mapped buffer for scan
ClosedPublic

Authored by kib on Sun, May 17, 12:12 AM.
Tags
None
Referenced Files
F158240108: D57036.diff
Sat, May 30, 5:40 AM
Unknown Object (File)
Fri, May 29, 7:28 AM
Unknown Object (File)
Tue, May 26, 9:54 AM
Unknown Object (File)
Mon, May 25, 3:42 PM
Unknown Object (File)
Mon, May 25, 8:20 AM
Unknown Object (File)
Mon, May 25, 7:32 AM
Unknown Object (File)
Sat, May 23, 4:35 AM
Unknown Object (File)
Fri, May 22, 9:44 PM
Subscribers

Details

Summary
PR:     295348
Reported by:     Alastair Hogge <agh@riseup.net>
Fixes:  bab04ddf1fd4 ("ufs: support unmapped bufs for indirect blocks in bmap")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Sun, May 17, 12:12 AM

Why does ufs_bmap_seekdata() cause a panic when it uses an unmapped buffer?

Why does ufs_bmap_seekdata() cause a panic when it uses an unmapped buffer?

The function scans the indirect blocks to find holes/data if the file is large enough. Then it needs to access the indirect block content, which requires the mapping.

Unlike ufs_bmap(), which only needs to read the single value at specific index, ufs_bmap_seekdata() often needs to scan the whole buffer of the indirect block. Due to this, it does not make sense to only map single page with sf_buf.

Sorry for the delay in answering. I am in a remote area of California and the power / Internet has been out since just after I sent my question. Power outages are unfortunately routine enough for you that you can work around them, me not so much.

This revision is now accepted and ready to land.Sun, May 17, 9:56 PM