summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_prealloc.c
AgeCommit message (Collapse)AuthorFilesLines
2022-08-06vfs: change openat propotype to match linux openat2Volker Lendecke1-6/+5
The Linux prototype for openat2 looks like this: long openat2(int dirfd, const char *pathname, struct open_how *how, size_t size); where "struct open_how" is defined in "linux/openat2.h". It is designed to be extensible with further flags. The "size" parameter is required because there is no type checking between userland and kernelspace, so the way for Linux to find which version of open_how is being passed in is looking at the size: "open_how" is expected to only every grow with additional fields, should a change be necessary in the future. Samba does not have this problem, we can typecheck the struct and pointers, we expect all VFS modules to be compiled against the current vfs.h. For now this adds no functionality, but it will make further patches much smaller. Pair-programmed-with: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2022-02-17vfs: Don't go through strnorm(..., CASE_LOWER)Volker Lendecke1-1/+3
With a fixed CASE_LOWER we should go directly to the lowerlevel call, this makes it more obvious to me. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2022-02-17vfs: Fix a typoVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-12-16smbd: use fsp_get_io_fd() when accessing a file or it's associated metadataRalph Boehme1-1/+1
In all places where we access or modify a file or it's associated metadata, we use fsp_get_io_fd() to fetch the low-level fd from the fsp. This ensures we don't accidentally use a pathref fsp where the fd would be opened as root on systems lacking O_PATH. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-05-21vfs: remove SMB_VFS_OPEN()Ralph Boehme1-87/+0
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-05-21vfs_prealloc: implement SMB_VFS_OPENAT()Ralph Boehme1-0/+87
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2017-12-18vfs: Use static_decl_vfs in all VFS modulesChristof Schmitt1-1/+1
Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Dec 18 13:32:00 CET 2017 on sn-devel-144
2017-04-22lib: modules: Change XXX_init interface from XXX_init(void) to ↵Jeremy Allison1-2/+2
XXX_init(TALLOC_CTX *) Not currently used - no logic changes inside. This will make it possible to pass down a long-lived talloc context from the loading function for modules to use instead of having them internally all use talloc_autofree_context() which is a hidden global. Updated all known module interface numbers, and added a WHATSNEW. Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Apr 22 01:17:00 CEST 2017 on sn-devel-144
2015-02-11vfs_prealloc: Remove call to gpfs_preallocChristof Schmitt1-9/+0
Calling gpfs_prealloc changes the actual size of the file, and this should not be done implicitly. Also this code does not compile due to the missing dependency to the gpfs library. The best way solution here is probably removing the call to gpfs_prealloc. The vfs_gpfs module already implements the call to gpfs_prelloc when this can be done safely. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Feb 11 02:03:09 CET 2015 on sn-devel-104
2012-08-09Check error returns on strnorm().Jeremy Allison1-1/+3
2012-04-06build: Remove SMB_OFF_T, replace with off_tAndrew Bartlett1-5/+5
Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Apr 6 01:47:43 CEST 2012 on sn-devel-104
2012-04-05Remove off64_t declarationsAndrew Bartlett1-1/+1
2011-12-12vfs: Make function pointer names consistent. They all end in _fnRichard Sharpe1-1/+1
Autobuild-User: Richard Sharpe <sharpe@samba.org> Autobuild-Date: Mon Dec 12 04:58:40 CET 2011 on sn-devel-104
2011-09-23Revert "Add a missing include file to two VFS modules"Jeremy Allison1-1/+0
My mistake - should have been 3.6.x only. This reverts commit 2e4d0641950ce6e38724ca71b46cf925f51ac7be.
2011-09-15Add a missing include file to two VFS modulesRichard Sharpe1-0/+1
Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Sep 15 02:56:36 CEST 2011 on sn-devel-104
2011-08-09s3:vfs_prealloc: fix build on SLES8Björn Jacke1-0/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Björn Jacke <bj@sernet.de> Autobuild-Date: Tue Aug 9 19:29:08 CEST 2011 on sn-devel-104
2011-04-21s3-vfs: rename open function to open_fn.Günther Deschner1-1/+1
This should finally fix the AIX build and allow to remove AIX specific ifdefs. Guenther Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Apr 21 02:01:20 CEST 2011 on sn-devel-104
2011-03-30s3-vfs: include smbd/smbd.h in vfs modules.Günther Deschner1-0/+1
Guenther
2009-11-30Restructure the connect function code to always callJeremy Allison1-2/+8
down to NEXT-> before initializing. This allows us to do cleanup (by calling DISCONNECT) if initialization fails. Also fix vfs_acl_xattr which was failing to call the NEXT connect function. Jeremy.
2009-08-02Fix breakage for connect function after API change (connect -> connect_fn)Alexander Bokovoy1-1/+1
2009-07-24Make the smbd VFS typesafeVolker Lendecke1-6/+5
2009-06-17s3: Change SMB_VFS_OPEN to take an smb_filename structTim Prouty1-6/+7
This was a little messy because of all of the vfs modules I had to touch. Most of them were pretty straight forward, but the streams modules required a little attention to handle smb_filename. Since the use of smb_filename enables the vfs modules to access the raw, over-the-wire stream, a little bit of the handling that was being done by split_ntfs_stream_name has now been shifted into the individual stream modules. It may be a little more code, but overall it gives more flexibility to the streams modules, while also allowing correct stream handling.
2009-02-09s3 vfs: Add a destructor to the fsp extension data APITim Prouty1-1/+1
I'm not certain if the dummy pointer is needed in struct vfs_fsp_data, but I added it to be consistent with the comment below.
2008-12-04Fix bug #5929 - vfs_prealloc does not build with option ↵Henning Henkel1-1/+1
--with-cluster-support and GPFS
2008-02-20From: David Disseldorp <ddiss@sgi.com>Jeremy Allison1-2/+1
The vfs_prealloc module makes use of the now redundant fd parameter for SMB_VFS_FTRUNCATE(), instead get the fd from the files_struct. Patch for Samba 3.2 Test branch below. Cheers, David D (This used to be commit d9b72282c63b57c8e54131306b2a3028a1ea41dc)
2008-01-16Support GPFS prealloc interfaceAlexander Bokovoy1-0/+8
Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit c26e355533e473c4386d0e6d651637e71d4231dc)
2008-01-07Remove redundant parameter fd from SMB_VFS_FTRUNCATE().Michael Adam1-2/+1
Michael (This used to be commit 2ad66050a0452b8e7e08b1e7a01efa00c72fd451)
2007-10-10r23801: The FSF has moved around a lot. This fixes their Mass Ave address.Andrew Tridgell1-2/+1
(This used to be commit 87c91e4362c51819032bfbebbb273c52e203b227)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r20261: merge 20260 from samba_3_0_24Herb Lewis1-0/+1
clean up a bunch of no previous prototype warnings (This used to be commit c60687db112405262adf26dbf267804b04074e67)
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-0/+214
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)