public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] iomap: fixes for fiemap interface
@ 2016-08-08  6:22 Dave Chinner
  2016-08-08  6:22 ` [PATCH 1/2] iomap: fiemap should honor the FIEMAP_FLAG_SYNC flag Dave Chinner
  2016-08-08  6:22 ` [PATCH 2/2] iomap: add fiemap support for attribute mappings Dave Chinner
  0 siblings, 2 replies; 5+ messages in thread
From: Dave Chinner @ 2016-08-08  6:22 UTC (permalink / raw)
  To: xfs; +Cc: linux-fsdevel

Hi folks,

A couple of fixes things that Darrick and I noticed when using the
iomap fiemap implementation. Darrick noticed that the attribute fork
couldn't be mapped when updating his XFS scrubbing utility, and I
noticed that the FIEMAP_FLAG_SYNC was being ignored by the code
while looking at the attribute mapping issue.  Both are regressions
agains the old XFS fiemap implementation.

The attribute mapping patch is the one that needs the most attention
as it adds an iomap control flag and a new iomap internal error. The
issue is that we don't know if there are attributes to map until
we call down into the filesystem specific code, and at that point we
need to tell iomap_apply() that there is nothing to map and so break
out. This is done by returning -ENOENT, and then capturing that
in iomap_fiemap() and treating it like we've reached the end of
file. This causes fiemap to report the attribute map as having no
extents.

We also need to protect against write mappings being made against
the attribute fork in XFS as it's not valid to write into the
attribute extent map via this method. Hence we return -EINVAL if we
detect an attempt to do so through the iomap control flags.

I'm not sure it's the best way to solve the problem, but it does
work. Better ideas are welcome...

-Dave.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

end of thread, other threads:[~2016-08-09  7:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-08  6:22 [PATCH 0/2] iomap: fixes for fiemap interface Dave Chinner
2016-08-08  6:22 ` [PATCH 1/2] iomap: fiemap should honor the FIEMAP_FLAG_SYNC flag Dave Chinner
2016-08-09  7:28   ` Christoph Hellwig
2016-08-08  6:22 ` [PATCH 2/2] iomap: add fiemap support for attribute mappings Dave Chinner
2016-08-09  7:34   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox