question about allocation roundup size and smb_roundup()

ssdl.566 ssdl.566 at 163.com
Tue Mar 6 05:47:12 UTC 2018


Hi all:
       I noticed in sources/smbd/open.c, after file was created,  vfs_allocate_file_space()  function was called to allocate space for new file. The size passed to vfs_allocate_file_space() is returned  by  smb_roundup(conn, allocation_size). 
      When the file copied  is small, .e.g 25KB , the size returned by smb_roundup () is still 1048576 (same as allocation roundup size), i want to know why?
      if the file is smaller than 1048576, why cannot call vfs_allocate_file_space () funtion to just allocate the real file size instead  of 1048576?


many many thanks.
leilei dong







More information about the samba-technical mailing list