gluster-devel
[Top][All Lists]
Advanced

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

Re: [Gluster-devel] zerofill() FOP


From: Bharata B Rao
Subject: Re: [Gluster-devel] zerofill() FOP
Date: Tue, 11 Jun 2013 09:19:25 +0530

On Tue, Jun 11, 2013 at 12:18 AM, Anand Avati <address@hidden> 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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]