[Bugs] [Bug 1327857] fallocate + punch_hole used instead of fallocate + zero_range in glfs_discard ()

bugzilla at redhat.com bugzilla at redhat.com
Mon Nov 28 15:39:21 UTC 2016


https://bugzilla.redhat.com/show_bug.cgi?id=1327857

Niels de Vos <ndevos at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ndevos at redhat.com,
                   |                            |prasanna.kalever at redhat.com
                   |                            |, socketpair at gmail.com
              Flags|                            |needinfo?(socketpair at gmail.
                   |                            |com)



--- Comment #2 from Niels de Vos <ndevos at redhat.com> ---
A related question came up on the mailinglist:
  http://www.gluster.org/pipermail/gluster-devel/2016-November/051610.html

(In reply to Коренберг Марк from comment #0)
> primarily, problem happen with qemu with glusterfs backend. Since
> underlaying FS is ext4, when libglusterfs punches holes with
> FALLOC_FL_PUNCH_HOLE, it makes files heavy fragmented. Instead of this,
> FALLOC_FL_ZERO_RANG may be used. FALLOC_FL_ZERO_RANG must also pass discard
> requests to underlaying block device, so, feature used in qemu still be
> achieved.
> 
> 1. Does FUSE allows to implement both fallocate cases ?

Yes, it seems so. At least we account for both flags in fuse-bridge.c:
  https://github.com/gluster/glusterfs/commit/17f28717

> 2. How does these cases handled in GlusterFS ? I mean usage through FUSE.

See https://github.com/gluster/glusterfs/commit/17f28717

> 3. I suggest API change in order to able to handle both cases in
> libglusterfs.

Can you be a bit more specific on the suggested change? Note that the protocol
and functions in libgfapi should stay backwards compatible.

> 4. QEMU glusterfs backend should be configurable how to pass discards from
> guest fs - using FALLOC_FL_ZERO_RANGE or FALLOC_FL_PUNCH_HOLE.

This is something that we could add to the Gluster block-driver in QEMU.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list