The Samba-Bugzilla – Bug 8613
"strict allocate" broken on AIX
Last modified: 2014-06-12 11:11:05 UTC
the fallocate() rewrite broke the "strict fallocate" support on AIX:
[2011/11/15 16:48:52.190669, 10] smbd/trans2.c:6720
smb_set_file_end_of_file_info: Set end of file info for file 4G to
[2011/11/15 16:48:52.190733, 6] smbd/trans2.c:5614(smb_set_file_size)
smb_set_file_size: size: 4096000000 smb_set_file_size: file 4G : setting
new size to 4096000000
[2011/11/15 16:48:52.190806, 10] smbd/vfs.c:561(vfs_set_filelen)
vfs_set_filelen: ftruncate 4G to len 4096000000
[2011/11/15 16:48:52.190870, 10] modules/vfs_default.c:898
strict_allocate_ftruncate: SMB_VFS_FALLOCATE failed with error 22.
Falling back to slow manual allocation
[2011/11/15 16:49:08.878370, 10] smbd/notify_internal.c:930(notify_trigger)
notify_trigger called action=0x3, filter=0xc,
[2011/11/15 16:49:08.878715, 5] smbd/fileio.c:267
Update write time immediate on 4G
[2011/11/15 16:49:08.878775, 5] locking/locking.c:1665(set_write_time)
set_write_time: Tue Nov 15 16:49:09 2011 CET id=22000a:7012:0
Plain posix_fallocate() is working well on that AIX box.
Unfortunately what is failing isn't clear in this log. Exactly what is going wrong here ?
I didn't have a change to analyze what smbd is actually doing here. I'll try to reproduce the problem on our AIX buildfarm box later on. I hoped you'd have an idea what might go on here. From looking at the code it looks like posix_fallocate() is still being prefered over fallocate() unless VFS_FALLOCATE_KEEP_SIZE is used (so currently never) ? Or is the new code trying to use fallocate() in any case (which would explain why it doesn't work on AIX anymore) ? I don't really get through that currently.
If fallocate() is detected we try and use that, then should fall back to posix_fallocate(). Need more data on isn't working. I'm guessing it's a configure problem though.
Created attachment 7130 [details]
config.log from that aix box
the configure result is attached, looks good to me.
tested on an AIX 6.1 machine again. seems to work at least with 4.0 now ...