[PATCH 0/2] iomap: fixes for fiemap interface

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

 



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@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux