[Gluster-devel] zerofill() FOP

Bharata B Rao bharata.rao at gmail.com
Tue Jun 11 03:49:25 UTC 2013


On Tue, Jun 11, 2013 at 12:18 AM, Anand Avati <anand.avati at gmail.com> wrote:
> It would be nice to make the fop match the writesame() semantics (@buf,
> @len, @offset, @repeat) and just use it for zerofill as a specific use case,
> by providing a 1 byte buffer storing a 0, repeated @len times. Thoughts?

You mean "repeated @repeat times" I think.

>
> In the storage/bd layer, you can detect if the arguments are trying to
> zero-fill (by inspecting @buf) and conditionally call ioctl(BLKZEROOUT).
> This will prepare gluster for providing a more generic block layer interface
> (in the furtue, for iSCSI?)

While I see the value in having an API very generic to cover all
possible use cases for WRITE SAME, I am not sure if we should let go
the opportunity to have a very simple zerofill(fd, offset, len) API
that just does one thing of zeroing out a range of the file.

May be it will be easier to decide b/n generic writesame() vs
particular zerofill() if we can list out the potential use cases of
WRITE SAME. Do you or others know of any use case where WRITE SAME is
used or proposed to be used for anything other than zeroing ?

Regards,
Bharata.
-- 
http://raobharata.wordpress.com/




More information about the Gluster-devel mailing list