linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* gfs2 IOMAP_ZERO confusion
@ 2018-03-13  8:22 Christoph Hellwig
  2018-03-15 13:20 ` Bob Peterson
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2018-03-13  8:22 UTC (permalink / raw)
  To: Bob Peterson; +Cc: Andreas Gruenbacher, Dave Chinner, linux-fsdevel

Hi Bob,

In "GFS2: Implement iomap for block_map" you seem to have misunderstood
the intention of the IOMAP_ZERO flag.  It it set if iomap_begin is
called for a zeroing operation, so that we don't allocate new blocks
for holes or unwritten extents.  It is not supposed to actually zero
the blocks.  Can you use some other way to communicate you internal
zeroing request?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gfs2 IOMAP_ZERO confusion
  2018-03-13  8:22 gfs2 IOMAP_ZERO confusion Christoph Hellwig
@ 2018-03-15 13:20 ` Bob Peterson
  0 siblings, 0 replies; 2+ messages in thread
From: Bob Peterson @ 2018-03-15 13:20 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Andreas Gruenbacher, Dave Chinner, linux-fsdevel

----- Original Message -----
| Hi Bob,
| 
| In "GFS2: Implement iomap for block_map" you seem to have misunderstood
| the intention of the IOMAP_ZERO flag.  It it set if iomap_begin is
| called for a zeroing operation, so that we don't allocate new blocks
| for holes or unwritten extents.  It is not supposed to actually zero
| the blocks.  Can you use some other way to communicate you internal
| zeroing request?
| 
Hi Christoph,

I guess I misappropriated the flag because it seemed like a convenient
way to handle the buffer_zeronew() flag for our block_map function.

The problem is: since GFS2 is not extent-based, we have no good way to
mark groups of blocks as needing to be zeroed in the future, for purposes
like fallocate. I wish there was. There's definitely not enough bits in
our (2-bits-per-block) bitmap for that, although that would be nice.

So we can either add in a new iomap flag and do it when it's convenient,
or else handle the zeroing separately from functions that call iomap,
like in gfs2_block_map, fallocate, and so forth. Or perhaps something
that runs in the background like from a workqueue, etc.

What are your thoughts?

Regards,

Bob Peterson
Red Hat File Systems

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-15 13:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-13  8:22 gfs2 IOMAP_ZERO confusion Christoph Hellwig
2018-03-15 13:20 ` Bob Peterson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).