[Gluster-devel] zerofill() FOP

Bharata B Rao bharata.rao at gmail.com
Mon Jun 10 03:53:03 UTC 2013


Hi,

We are planning to add a new FOP to GlusterFS to exploit the WRITE
SAME capability of the underlying block device in case of BD xlator.
Linux has recently added support for WRITE SAME by means of a new
ioctl (BLKZEROOUT) that can be used to zero-out a range of blocks. We
are proposing the following FOP to support BLKZEROOUT ioctl in
GlusterFS:

int zerofill(struct glfs_fd *glfd, off_t offset, size_t len)

This will zero-out the range of the file represented by @glfd,
starting from @offset for @len bytes.

Posix backend can implement the zerofill() in whatever way that is
convenient/efficient, all it has do is to write zeroes to the file in
the specified range.

BD backend will issue ioctl(fd, BLKZEROOUT, params[2]) in response to
zerofill(glfd, offset, len). param[0] is the starting sector number
which should be derived from offset. param[1] is the nr_sectors which
should be derived from len.

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




More information about the Gluster-devel mailing list