summaryrefslogtreecommitdiff
path: root/source3/modules
AgeCommit message (Collapse)AuthorFilesLines
2009-06-17s3 onefs: Remove dfs resolution from create_file() now that it's being done ↵Tim Prouty1-22/+1
at a higher level
2009-06-17s3: Change SMB_VFS_OPEN to take an smb_filename structTim Prouty17-117/+352
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-06-17s3: Plumb smb_filename from create_file all of the way down to fd_openTim Prouty1-7/+2
I used the smb_filename struct everywhere that was feasible for the first pass. There are still some places in this path that need to be changed to use smb_filename, but this is a good start. I also: - Removed fname/path arguments from a few functions that weren't really using them. - Added a utility function for detecting whether an smb_filename is a stream.
2009-06-15s3 onefs: Fix reading over the end of the array, because the incorrect array ↵Tim Prouty1-2/+3
was being read.
2009-06-15s3 onefs: Change onefs modules to use the new createfile apiTim Prouty3-43/+46
2009-06-12s3: Plumb smb_filename through SMB_VFS_CREATE_FILETim Prouty2-21/+13
2009-06-10s3: Remove unix_convert handling from createfile implementationsTim Prouty1-30/+4
2009-06-02Support getting gpfs birthtimeVolker Lendecke3-0/+82
2009-06-02Store winattrs in GPFSMathias Dietz3-0/+142
1. Store win attributes in gpfs instead of posix bits. 2. use of path based winattr calls of gpfs. Signed-off-by: Mathias Dietz <mdietz@de.ibm.com>
2009-06-02Add a "connectpath" operation to the shadow_copy2 moduleVolker Lendecke1-0/+54
2009-06-02Add SMB_VFS_CONNECTPATH operationVolker Lendecke2-0/+26
This is required for the shadow_copy2 module and "wide links = no". The file system snapshots by nature are typically outside of share directory. So the REALPATH result fails the wide links = no test.
2009-05-28s3 onefs: update the onefs module to be compliant with stat_exTim Prouty8-77/+192
2009-05-27Fix the build of nfs4_acls.cVolker Lendecke1-1/+2
2009-05-27Fix a size_t/int warningVolker Lendecke1-1/+1
2009-05-26Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STATVolker Lendecke16-99/+103
This patch introduces struct stat_ex { dev_t st_ex_dev; ino_t st_ex_ino; mode_t st_ex_mode; nlink_t st_ex_nlink; uid_t st_ex_uid; gid_t st_ex_gid; dev_t st_ex_rdev; off_t st_ex_size; struct timespec st_ex_atime; struct timespec st_ex_mtime; struct timespec st_ex_ctime; struct timespec st_ex_btime; /* birthtime */ blksize_t st_ex_blksize; blkcnt_t st_ex_blocks; }; typedef struct stat_ex SMB_STRUCT_STAT; It is really large because due to the friendly libc headers playing macro tricks with fields like st_ino, so I renamed them to st_ex_xxx. Why this change? To support birthtime, we already have quite a few #ifdef's at places where it does not really belong. With a stat struct that we control, we can consolidate the nanosecond timestamps and the birthtime deep in the VFS stat calls. At this moment it is triggered by a request to support the birthtime field for GPFS. GPFS does not extend the system level struct stat, but instead has a separate call that gets us the additional information beyond posix. Without being able to do that within the VFS stat calls, that support would have to be scattered around the main smbd code. It will very likely break all the onefs modules, but I think the changes will be reasonably easy to do.
2009-05-21s3 onefs: Fix invalid argument from the unix_convert smb_filename struct patchTim Prouty1-1/+1
2009-05-20s3: Change unix_convert (and its callers) to use struct smb_filenameTim Prouty1-2/+13
This is the first of a series of patches that change path based operations to operate on a struct smb_filename instead of a char *. This same concept already exists in source4. My goals for this series of patches are to eventually: 1) Solve the stream vs. posix filename that contains a colon ambiguity that currently exists. 2) Make unix_convert the only function that parses the stream name. 3) Clean up the unix_convert API. 4) Change all path based vfs operation to take a struct smb_filename. 5) Make is_ntfs_stream_name() a constant operation that can simply check the state of struct smb_filename rather than re-parse the filename. 6) Eliminate the need for split_ntfs_stream_name() to exist. My strategy is to start from the inside at unix_convert() and work my way out through the vfs layer, call by call. This first patch does just that, by changing unix_convert and all of its callers to operate on struct smb_filename. Since this is such a large change, I plan on pushing the patches in phases, where each phase keeps full compatibility and passes make test. The API of unix_convert has been simplified from: NTSTATUS unix_convert(TALLOC_CTX *ctx, connection_struct *conn, const char *orig_path, bool allow_wcard_last_component, char **pp_conv_path, char **pp_saved_last_component, SMB_STRUCT_STAT *pst) to: NTSTATUS unix_convert(TALLOC_CTX *ctx, connection_struct *conn, const char *orig_path, struct smb_filename *smb_fname, uint32_t ucf_flags) Currently the smb_filename struct looks like: struct smb_filename { char *base_name; char *stream_name; char *original_lcomp; SMB_STRUCT_STAT st; }; One key point here is the decision to break up the base_name and stream_name. I have introduced a helper function called get_full_smb_filename() that takes an smb_filename struct and allocates the full_name. I changed the callers of unix_convert() to subsequently call get_full_smb_filename() for the time being, but I plan to eventually eliminate get_full_smb_filename().
2009-05-20Use SMB_VFS_NEXT_CLOSE. This VFS stuff is really opaque to me...Volker Lendecke1-5/+1
Thanks Michael to provide some transparency :-)
2009-05-20Fix bug disclosed by lock8 torture testVolker Lendecke1-0/+17
We have to drop the gpfs level share modes, regardless of whether we put the file into the pending close queue.
2009-05-19s3 onefs: Removing an incorrect TALLOC_FREEAravind Srinivasan1-1/+0
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-05-18Move down the become_root()/unbecome_root() calls into the VFS modulesVolker Lendecke1-2/+22
The aio_fork module does not need this, as it does not communicate via signals but with pipes. Watching a strace log with those become_root() calls in aio.c is absolutely awful, and it does affect performance.
2009-05-18In aio_fork, we have to close all fd's, we might hold a gpfs share modeVolker Lendecke1-0/+16
Keeping such an fd open prohibits another open of that same file.
2009-05-18Fix a race condition in vfs_aio_fork with gpfs share modesVolker Lendecke1-2/+8
2009-05-12s3 onefs: Self-contend level2 oplocks on BRLZack Kirsch1-1/+14
2009-05-12s3 onefs: Fix ignore sacl parameterTim Prouty4-24/+36
2009-05-12Clean up assignments to iov_base, ensure it's always cast to void *. This ↵Jeremy Allison2-4/+4
should quieten some warnings with picky compilers on the buildfarm. Jeremy.
2009-05-11Fix a bunch of compiler warnings about wrong format types.Jeremy Allison1-7/+7
Should make Solaris 10 builds look cleaner. Jeremy.
2009-05-05s3 onefs: Turn up the debug level for non-error casestprouty1-3/+3
2009-05-05s3: Fix trans2 path to use case-insensitive stat optimizationtprouty1-2/+6
Often times before creating a file, a client will first query to see if it already exists. Since some systems have a case-insensitive stat that is called from unix_convert, we can definitively return STATUS_NO_SUCH_FILE to the client without scanning the whole directory. This code path is taken from trans2querypathinfo, but trans2findfirst still does a full directory scan even though the get_real_filename (the case-insensitive stat vfs call) can prevent this. This patch adds the get_real_filename call to the trans2find* path, and also changes the vfs_default behavior for SMB_VFS_GET_REAL_FILENAME. Previously, in the absence of a get_real_filename implementation, we would fallback to the full directory scan. The default behavior now returns -1 and sets errno to EOPNOTSUPP. This allows SMB_VFS_GET_REALFILENAME to be called from trans2* and unix_convert.
2009-05-05s3:onefs.so Change system function namesSteven Danneman1-4/+4
Addendum to c49730e1. Use newer cookie conversion names.
2009-05-04s3:onefs.so fix issue with missing entries when enumerating directoriesSteven Danneman1-130/+75
This bug prompted several, fairly large changes to the of OneFS's readdirplus() within Samba. One fundamental problem is that we kept our cache cursor pointed at the next entry to be returned from onefs_readdir(), while the resume cookie needed to refill the cache such that our cursor would be on this entry, was located in the previous cache entry. This meant that to correctly handle seekdir() cases which could be found within the existing cache, and cases where a cache reload was needed, required that the cache always hold at least two entries: the entry we wished to return, and the previous entry which held the resume cookie. Since the readdirplus() syscall gives us no guarantee that it will always return these two direntries, there was a fundamental problem with this design. To fix this problem, I have rearchitected the onefs_readdir() path to keep its pointer on the entry which contains the resume_cookie, not the entry which will be returned next. Essentially, I changed onefs_readdir() from a "return an entry then increment the cursor" model to "increment the cursor then return an entry". By doing this, we only require that a single entry be within the cache: the entry containing the resume cookie. Second, there have been numerous off-by-one bugs in my implementation of onefs_seekdir() which did a mapping between the 64-bit resume cookie returned by readdirplus() and its own monotonically increasing "location" offset. Furthermore, this design caused a somewhat frequent waste of cycles, as in some cases we'd need to re-enumerate the entire directory to recover the current "location" from an old resume cookie. As this code was somewhat difficult to understand, prone to bugs, and innefficient in some cases I decided it was better to wholesale replace it now, rather than later. It is possible to algorithmically map the 64-bit resume cookies from readdirplus() into 32-bit offset values which SMB requires. The onefs.so module now calls into a system library to do this conversion. This greatly simplifies both the seekdir() and telldir() paths and is more efficient.
2009-04-28Fix annoying debug messages when no snapshots are usedVolker Lendecke1-2/+3
Not being able to open the shadow copy directory is the same as having no shadow copy support at all. The VFS module should in this case not log with debug level 0 and set ENOSYS to indicate "no shadow copies used" to the higher levels.
2009-04-07s3 onefs: Fix case-insensitivity for mangled namesTim Prouty1-0/+12
onefs_get_real_filename needs to demangle the filename before doing the case-insensitive estat
2009-04-06Make some functions static to vfs_gpfs.cVolker Lendecke1-14/+14
2009-04-06Add prototype for smbd_gpfs_get_realfilename_pathVolker Lendecke1-0/+2
2009-04-06Fix two c++ warnings in vfs_gpfs.cVolker Lendecke1-2/+2
2009-04-01s3 onefs: Quiet a log message about oplocks being requested on streamsTim Prouty1-21/+16
2009-03-31s3 onefs: Add missing newlines to debug statements in the onefs moduleTim Prouty4-15/+16
2009-03-31s3 onefs: Async failures are resulting in SMB_ASSERT->smb_panic while ↵Zack Kirsch1-2/+2
running many of the LOCK torture tests. Return true from the onefs cancel function if we've errored, which can happen when the CBRL domain is configured to only give out 1 lock. :)
2009-03-27s3: added per-client statistics to onefs perfcount moduleScott Urban2-23/+38
* we now track, uid, remote ip, and local ip per CIFS operation * removed perfcount_set_client() from perfcount interface as it's unecessary
2009-03-27Fix the build of nfsv4_acls.cVolker Lendecke1-1/+1
.. after adding smb_iconv_convenience to ndr_size_security_descriptor()
2009-03-26Try and fix the build farm RAW-STREAMS errors. Ordering ofJeremy Allison1-2/+2
modules shouldn't matter, so as vfs_streams_depot doesn't implement get/setxattrs then call into the full VFS stack at the top. Jeremy
2009-03-25Add missing newlines to debug statementsSteven Danneman1-2/+2
2009-03-24s3 onefs: Change error status to NT_ACCESS_DENIED for errors in ↵David Kwan1-5/+5
SET_SECURITY_DESC
2009-03-23s3 OneFS: Remove usage of non-existant functionTim Prouty1-9/+0
The function was removed in: c16c90a1cb3b0e2ceadd3dea835a4e69acfc2fae
2009-03-22Use StrCaseCmp in the dirsort moduleVolker Lendecke1-1/+1
2009-03-22Add dirsort moduleAndy Kelk1-0/+194
2009-03-18s3 onefs: Correctly error out when the read returns EOFTim Prouty1-5/+9
Also add some more debugging.
2009-03-13s3: Don't return in a void funtionTim Prouty1-1/+1
2009-03-13s3 OneFS: Add kernel strict locking supportDave Richards3-10/+95