xfs
[Top] [All Lists]

Error setting extent size on a directory

To: xfs@xxxxxxxxxxx
Subject: Error setting extent size on a directory
From: Iustin Pop <iusty@xxxxxxxxx>
Date: Mon, 14 Jul 2014 09:09:13 +0200
Delivered-to: xfs@xxxxxxxxxxx
Mail-followup-to: xfs@xxxxxxxxxxx
User-agent: Mutt/1.5.23 (2014-03-12)
Hi,

During the restore of a file system, a few directories failed to have
their extent size set:

xfsrestore: WARNING: attempt to set extended attributes (xflags 0x1080,
extsize = 0x800000, projid = 0x0) of a failed: Invalid argument

Since there were just a few, I've set the nodump flag (0x80 in flags
above) manually, which worked, but trying to set the extent size still
fails:
xfs_io .
xfs_io> extsize
[0] .
xfs_io> extsize 8m
xfs_io: XFS_IOC_FSSETXATTR .: Invalid argument

The xfsctl man page says that an extent size should be settable any time
on a directory, so why would this fail? Looking at the kernel sources,
I see a number of possible cases where EINVAL is returned:

- ip->i_d.di_nextents non-zero
- requested extend size bigger than MAXEXTLEN; not the case here
- extsize_fsb > mp->m_sb.sb_agblocks / 2; not the case
- fa->fsx_extsize % size - extent size not a multiple of FS block size;
  again not the case

So to me this reads as if the di_nextents check can also fail for a
directory which has extents, contradicting the man page. Which one needs
to be updated?

The question arises to if the extent size also applies, then, to
allocating extents for a directory - instead of just being inherited for
files (the man page says no).

thanks,
iustin

<Prev in Thread] Current Thread [Next in Thread>