On 12-07-20 03:44 AM, Dave Chinner wrote:
If you look in the function where I put this code is it AFTER the
head/len alignment so the HEAD is already align so I do not need to
account for it.
No need to shout. I did look at the code, and IMO you do need to
account for both head and tail extension and you definitely can't do
Sorry for the cap I did not intend to shout.
However the problem does exist. the len limitation in xfs_bmapi_write is
if you set the extsize.
Here is what I see.
xfs_bmapi_write() <= lenght limited to MAXEXTLEN;
xfs_bmap_extsize_align() <== Align the offest / len
Since the alignment is outward like you explain bellow we return len >
causing failure to report ENOSPC.
You can reproduce the problem the following way.
# uname -r
# mkfs.xfs -f -b size=512 -d agcount=1,size=4294967296 /dev/sdb5
meta-data=/dev/sdb5 isize=256 agcount=1, agsize=8388608 blks
= sectsz=512 attr=2, projid32bit=0
data = bsize=512 blocks=8388608, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal log bsize=512 blocks=20480, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
# mount /dev/sdb5 /a
# xfs_io -f -c "extsize 2m" -c "resvsp 0 1g" /a/data1
XFS_IOC_RESVSP64: No space left on device
So Maybe the fix is to limit the bma.length in xfs_bmapi_write to MAXEXTLEN
- (2 * extsz - 1) like you do in xfs_bmapi_reserve_delalloc().
Hope this is making sense.
Alain Renaud - Cluster File System Engineer
arenaud@xxxxxxx - SGI