Re: zerofill() FOP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 11, 2013 at 12:18 AM, Anand Avati <anand.avati@xxxxxxxxx> 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/



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux