gluster-devel
[Top][All Lists]
Advanced

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

[Gluster-devel] zerofill() FOP


From: Bharata B Rao
Subject: [Gluster-devel] zerofill() FOP
Date: Mon, 10 Jun 2013 09:23:03 +0530

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/



reply via email to

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