Bug 8613 - "strict allocate" broken on AIX
Summary: "strict allocate" broken on AIX
Status: RESOLVED WORKSFORME
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.6.1
Hardware: All AIX
: P5 normal
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 18:22 UTC by Björn Jacke
Modified: 2014-06-12 11:11 UTC (History)
0 users

See Also:


Attachments
config.log from that aix box (96.99 KB, application/x-redhat-package-manager)
2011-11-21 12:19 UTC, Björn Jacke
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Jacke 2011-11-15 18:22:45 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)
  smb_set_file_end_of_file_info: Set end of file info for file 4G to
4096000000
[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)
  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,
path=/oracle/JQA/flash_recovery_area/test_smb/4G
[2011/11/15 16:49:08.878715,  5] smbd/fileio.c:267
(trigger_write_time_update_immediate)
  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.
Comment 1 Jeremy Allison 2011-11-15 19:11:46 UTC
Hi Björn,

Unfortunately what is failing isn't clear in this log. Exactly what is going wrong here ?

Jeremy.
Comment 2 Björn Jacke 2011-11-16 18:10:53 UTC
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.
Comment 3 Jeremy Allison 2011-11-16 18:23:34 UTC
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.
Comment 4 Björn Jacke 2011-11-21 12:19:28 UTC
Created attachment 7130 [details]
config.log from that aix box

the configure result is attached, looks good to me.
Comment 5 Björn Jacke 2014-06-12 11:11:05 UTC
tested on an AIX 6.1 machine again. seems to work at least with 4.0 now ...