Bug in Samba's implementation of FSCTL_QUERY_ALLOCATED_RANGES?

David Howells dhowells at redhat.com
Thu May 23 06:21:01 UTC 2024


ronnie sahlberg <ronniesahlberg at gmail.com> wrote:

> On Thu, 23 May 2024 at 14:54, David Disseldorp <ddiss at samba.org> wrote:
> It might be best to just ignore tests that fail in this area. And just
> accept that some things, at best, is a best-effort approximation.
> (as long as dataloss does not happen, of course. That is never acceptable)
> At the end of the day it is a lot of guesswork and trying to fit a
> square peg (unpredictable ntfs behavior) into a round hole (linux vfs
> api).

The problem is that it essentially renders SEEK_DATA/SEEK_HOLE unusable for
applications on cifs.  If there's more than one extent above the starting
position, they'll fail with EIO.  The only way to do it is to provide for a
sufficiently large buffer to accommodate however many extents that there are
(and there could be millions, in theory) in order to get just the first one.

David




More information about the samba-technical mailing list