Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Dec 2015 20:02:30 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        Warner Losh <imp@bsdimp.com>, "freebsd-hackers\@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Fwd: DELETE support in the VOP_STRATEGY(9)?
Message-ID:  <86lh94rcft.fsf@desk.des.no>
In-Reply-To: <20151208175414.GB82577@kib.kiev.ua> (Konstantin Belousov's message of "Tue, 8 Dec 2015 19:54:14 %2B0200")
References:  <CAH7qZftSVAYPmxNCQy=VVRj79AW7z9ade-0iogv2COfo2x%2Ba2Q@mail.gmail.com> <201512052002.tB5K2ZEA026540@chez.mckusick.com> <CAH7qZfs6ksE%2BQTMFFLYxY0PNE4hzn=D5skzQ91=gGK2xvndkfw@mail.gmail.com> <86poyhqsdh.fsf@desk.des.no> <CAH7qZftVj9m_yob=AbAQA7fh8yG-VLgM7H0skW3eX_S%2Bv75E-g@mail.gmail.com> <86fuzdqjwn.fsf@desk.des.no> <CANCZdfo=NfKy51%2B64-F_v%2BDh2wkrFYP4gXe=X9RWSSao49gO9g@mail.gmail.com> <CANCZdfqHoduhdCss0b6=UsBPAxfRZv4hF8vyuUVLBdP5gYUduQ@mail.gmail.com> <20151208175414.GB82577@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Konstantin Belousov <kostikbel@gmail.com> writes:
> Exactly. I completely agree with the statement above, and think that
> this is the only thing that should be implemented. There could be a
> request, most likely an filesystem-level ioctl, which punches holes in
> the file. Its effect on the file state should be the same as if the
> seek was done between writes, if the filesystem supports the ioctl.
> More, if supported, the lseek(SEEK_HOLE/SEEK_DATA) behaviour should
> be consistent with the request. The later might mean that we should
> restrict the interface to only accept ranges at block boundaries.

Having spent a couple of weeks recently trying to get code that uses
SEEK_HOLE to work reliably, my advice is to burn it down and salt the
earth.  Wait, am I thinking out loud again?  What I meant to say is that
there is no such thing as consistency where SEEK_HOLE is concerned, and
it might as well just be an alias for (SEEK_END, 0).

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86lh94rcft.fsf>