[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.

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux