Do we need sys_open() et al (_LARGEFILE64_SOURCE and open64())?

Andrew Bartlett abartlet at samba.org
Wed Mar 28 03:40:47 MDT 2012


On Tue, 2012-03-27 at 11:33 -0700, Jeremy Allison wrote:
> On Mon, Mar 26, 2012 at 10:10:49PM +1100, Andrew Bartlett wrote:
> > 
> > I was really hoping folks wouldn't jump to that conclusion.  To be
> > really, really clear:  I'm saying that Samba should require a platform
> > that has the ability to address files > 2 or 4GB with open(), pread(),
> > pwrite() etc and an off_t of 64 bits.  Such platforms have existed for
> > the greater part of two decades, even as '32 bit' systems.  
> > 
> > The purpose of my mail is that I think we would struggle to find any
> > systems that cannot support large files. 
> > 
> > Do be really, really clear: my personal Linux laptop is still 32 bit
> > 'only', and along with every other system I know of, will continue to
> > work after this change.
> 
> +1 from me. This seems a resonable requirement for a 4.0 release.

I've prepared a series of patches here:

https://git.samba.org/abartlet/samba.git/?p=abartlet/samba.git/.git;a=shortlog;h=refs/heads/largefile

I'm still testing it, but it passes a full autobuild on sn-devel.

This handles both the file based calls, aio and fcntl, using the
standard/POSIX functions instead of the 64-suffix functions.

Andrew Bartlett

git diff origin/master..HEAD|diffstat
 b/buildtools/wafsamba/wscript                  |    3 
 b/examples/VFS/skel_opaque.c                   |   18 
 b/examples/VFS/skel_transparent.c              |   18 
 b/examples/libsmbclient/Makefile               |    2 
 b/lib/util/become_daemon.c                     |    2 
 b/lib/util/fsusage.c                           |    7 
 b/lib/util/wscript_configure                   |    5 
 b/libgpo/gpext/gpext.c                         |   14 
 b/source3/client/client.c                      |   16 
 b/source3/client/clitar.c                      |    4 
 b/source3/configure.in                         |  537 +------------------------
 b/source3/include/includes.h                   |  107 ----
 b/source3/include/proto.h                      |   23 -
 b/source3/include/smb.h                        |    4 
 b/source3/include/vfs.h                        |   36 -
 b/source3/lib/dbwrap/dbwrap_file.c             |    8 
 b/source3/lib/pidfile.c                        |    8 
 b/source3/lib/popt_common.c                    |    2 
 b/source3/lib/recvfile.c                       |    2 
 b/source3/lib/sendfile.c                       |   12 
 b/source3/lib/smbconf/testsuite.c              |    2 
 b/source3/lib/smbrun.c                         |    2 
 b/source3/lib/system.c                         |  274 +-----------
 b/source3/lib/util.c                           |   12 
 b/source3/libgpo/gpo_filesync.c                |    2 
 b/source3/locking/posix.c                      |   29 -
 b/source3/modules/onefs.h                      |   18 
 b/source3/modules/onefs_dir.c                  |   52 +-
 b/source3/modules/onefs_streams.c              |    4 
 b/source3/modules/vfs_audit.c                  |    4 
 b/source3/modules/vfs_cap.c                    |   16 
 b/source3/modules/vfs_catia.c                  |    4 
 b/source3/modules/vfs_crossrename.c            |    6 
 b/source3/modules/vfs_default.c                |   48 +-
 b/source3/modules/vfs_dirsort.c                |   26 -
 b/source3/modules/vfs_extd_audit.c             |    4 
 b/source3/modules/vfs_full_audit.c             |   24 -
 b/source3/modules/vfs_netatalk.c               |   18 
 b/source3/modules/vfs_onefs_shadow_copy.c      |    4 
 b/source3/modules/vfs_prealloc.c               |    2 
 b/source3/modules/vfs_readahead.c              |    2 
 b/source3/modules/vfs_scannedonly.c            |   40 -
 b/source3/modules/vfs_shadow_copy.c            |   38 -
 b/source3/modules/vfs_shadow_copy2.c           |    8 
 b/source3/modules/vfs_streams_depot.c          |    2 
 b/source3/modules/vfs_time_audit.c             |   24 -
 b/source3/param/loadparm.c                     |   22 -
 b/source3/passdb/pdb_smbpasswd.c               |   24 -
 b/source3/rpc_server/samr/srv_samr_chgpasswd.c |   14 
 b/source3/smbd/dir.c                           |    2 
 b/source3/smbd/msdfs.c                         |    4 
 b/source3/smbd/oplock_irix.c                   |    2 
 b/source3/smbd/process.c                       |    4 
 b/source3/smbd/quotas.c                        |    6 
 b/source3/smbd/reply.c                         |   53 --
 b/source3/smbd/trans2.c                        |   29 -
 b/source3/smbd/vfs.c                           |   22 -
 b/source3/torture/cmd_vfs.c                    |    2 
 b/source3/utils/net_usershare.c                |   38 -
 b/source3/web/neg_lang.c                       |    5 
 b/source3/web/swat.c                           |    2 
 b/source3/wscript                              |  186 +-------
 b/tests/summary.c                              |    4 
 tests/fcntl_lock64.c                           |   96 ----
 64 files changed, 422 insertions(+), 1586 deletions(-)

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba-technical mailing list