1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

30 Commits

Author SHA1 Message Date
Jeremy Allison
8303bc49a4 Restructure the connect function code to always call
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-11-30 15:53:04 -08:00
Jeremy Allison
c69f92d16d Second attempt at fix for bug 6529 - Offline files conflict with Vista and Office 2003.
Confirmation from reporter that this fixes the issue in master on ext3/ext4.
Back-ports to follow.
Jeremy.
2009-08-24 20:57:37 -07:00
Tim Prouty
247a77a422 s3 onefs: Fix the onefs modules after the big refactoring 2009-07-24 18:46:07 -07:00
Volker Lendecke
033185e2a1 Make the smbd VFS typesafe 2009-07-24 11:42:05 -04:00
Tim Prouty
3cb0e521e1 s3: Plumb smb_filename through SMB_VFS_NTIMES 2009-07-06 15:38:42 -07:00
Tim Prouty
99bd4fda0c s3: Plumb smb_filename around SMB_VFS_CHFLAGS
SMB_VFS_CHFLAGS isn't actually getting the smb_filename struct for now
since it only operates on the basefile.  This is the strategy for all
path-based operations that will never actually operate on a stream.

By clarifying the meaning of path based operations that don't take an
smb_filename struct, modules that implement streams such as vfs_onefs
no longer need to implement SMB_VFS_CHFLAGS to ensure it's only called
on the base_name.
2009-07-06 15:38:41 -07:00
Tim Prouty
4e3656b8d1 s3: Change SMB_VFS_OPEN to take an smb_filename struct
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-17 20:11:53 -07:00
Tim Prouty
5c623e6c2e s3 onefs: update the onefs module to be compliant with stat_ex 2009-05-28 15:13:53 -07:00
Tim Prouty
161bd7f78f s3 onefs: Fix case-insensitivity for mangled names
onefs_get_real_filename needs to demangle the filename before doing
the case-insensitive estat
2009-04-07 10:44:50 -07:00
Dave Richards
5df46fa35b s3 OneFS: Add kernel strict locking support 2009-03-13 14:21:40 -07:00
Tim Prouty
243d4e8a08 s3 OneFS: Add parameter to ignore streams 2009-03-03 13:06:16 -08:00
Tim Prouty
664268a287 s3 OneFS: Refactor config code and cleanup includes 2009-03-01 16:39:55 -08:00
Tim Prouty
01493737c8 s3 OneFS: Add .snapshot directory configuration handling 2009-02-25 13:57:11 -08:00
Tim Prouty
8ec9903426 s3 OneFS: Add an atomic sendfile implementation 2009-02-21 17:10:42 -08:00
Steven Danneman
5bd7f9c61b s3: OneFS implementation of change notify
The OneFS Samba implementation of change notify is modeled after the
usage of Linux's inotify kernel subsystem.  A single call is made
into the onefs.so VFS module to initialize kernel tracking of certain
file change events.  When these events occur a kernel notification is
sent to smbd and the notification event is translated and given to the
general Samba Change Notify layer through a callback function.

The most difficult aspect is converting an SMB CompletionFilter to
a matching ifs_event mask, and then back to an appropriate change
notify action.  Currently, not all possible cases are handled by the
this module, but the most prevalent ones, which are tested by
smbtorture, are implemented.
2009-02-20 14:10:31 -08:00
Tim Prouty
53bcd162ee s3 OneFS: Add file_id_create implementation to take advantage of snapshots 2009-02-19 21:09:30 -08:00
Tim Prouty
6bd7e2b097 s3 OneFS: Add defaults to the fake timestamp parameters 2009-02-16 00:29:20 -08:00
Tim Prouty
85eccea0b4 s3 OneFS: Add recvfile implementation 2009-02-13 21:36:42 -08:00
Aravind Srinivasan
6085ba3dec s3 OneFS: Add vfs implementation for SMB_VFS_GET_REAL_FILE_NAME 2009-02-13 12:59:30 -08:00
Zack Kirsch
a3531314dd OneFS implementation of BRL VFS ops:
* Much of the beginning should look familiar, as I re-used the OneFS oplock
  callback record concept. This was necessary to keep our own state around - it
  really only consists of a lock state, per asynchronous lock that is currently
  unsatisfied.  The onefs_cbrl_callback_records map to BLRs by the id.
* There are 4 states an async lock can be in. NONE means there is no async
  currently out for the lock, as opposed to ASYNC. DONE means we've locked
  *every* lock (keep in mind a request can ask for multiple locks at a time.)
  ERROR is an error.
* onefs_cbrl_async_success: The lock_num is incremented, and the state changed,
  so that when process_blocking_lock_queue is run, we will try the *next* lock,
  rather than the same one again.
* onefs_brl_lock_windows() has some complicated logic:
    * We do a no-op if we're passed a BLR and the matching state is ASYNC --
      this means Samba is trying to get the same lock twice, and we just need
      to wait longer, so we return an error.
    * PENDING lock calls happen when the lock is being queued on the BLQ -- we
      do async in this case.
    * We also do async in the case that we're passed a BLR, but the lock is not
      pending. This is an async lock being probed by process_blocking_lock_queue.
    * We do a sync lock for any normal first request of a lock.
    * Failure is returned, but it doesn't go to the client unless the lock has
      actually timed out.
2009-02-13 10:08:55 -08:00
Steven Danneman
11f60a62a1 s3: OneFS bulk directory enumeration support
OneFS provides the bulk directory enumeration syscall readdirplus().  This
syscall has the same semantics as the NFSv3 READDIRPLUS command, returning
a batch of directory entries with prefetched stat information via one
syscall.

This commit wraps the readdirplus() call in the existing POSIX
readdir/seekdir VFS interface.  By default a batch of 128 directory entries
are optimistically read from the kernel into a global cache, and fed to
iterative calls of VFS_OP_READDIR.

The global buffers could be avoided in the future by hanging connection
specific buffers off the conn struct.

Added new parameter "onefs:use readdirplus" which toggles usage of this
code on or off.
2009-02-09 23:56:17 -08:00
todd stecher
5d070483ac s3 OneFS: Fake Timestamps
This checkin enables setting arbitrary timestamps on files matching
the pattern stored in smb.conf. This was a customer request for a
specific workflow.

Changes include:
1) configuration state machine to avoid tons of string comparisons on
   each and every stat.

2) Code to adjust post-stat() times to match time now, or sloptime +
   time now.
2009-02-09 00:36:39 -08:00
Tim Prouty
60d058442e s3 onefs: Add the OneFS implementation of SMB_VFS_GET_ALLOC_SIZE 2009-01-29 15:29:33 -08:00
todd stecher
c23f0f13b4 Modify OneFS module to support new NTIMES interfaces 2009-01-23 21:05:38 -08:00
Tim Prouty
a1e428914b s3: Add OneFS alternate data streams implementation 2009-01-11 22:13:36 -08:00
Tim Prouty
5c48ba6563 s3: General cleanup of the open path in the OneFS vfs module 2009-01-11 22:13:36 -08:00
Aravind Srinivasan
28894f9b82 s3: Add statvfs implementation to the onefs vfs module 2008-12-17 18:13:20 -08:00
Tim Prouty
e0711ffa52 s3: Add the OneFS SMB_VFS_CREATE_FILE implementation
This is the first pass at extending the onefs vfs module to support
the CIFS-specific enhancements available on OneFS.  Most of this patch
is massaging the sama open path to work with ifs_createfile.

ifs_createfile is a CIFS-specific syscall for opening/files and
directories.  It adds support for:
- Full in-kernel access checks using a windows access_mask
- Cluster-coherent share mode locks
- Cluster-coherent oplocks
- Streams
- Setting security descriptors at create time
- Setting dos_attributes at create time

This patch does not implement the samba side of the streams support or
oplocks support.  Tests that expect oplocks to be granted or streams
to be supported will fail.  This will be remedied in upcoming patches.
2008-12-09 14:51:48 -08:00
Steven Danneman
85b8cccab0 Add support for OneFS ACLs
Add to the OneFS VFS module, support for NTFS ACLs through the calls:

SMB_VFS_FGET_NT_ACL()
SMB_VFS_GET_NT_ACL()
SMB_VFS_FSET_NT_ACL()

Also create several new onefs specific smb.conf parameters in onefs.h
2008-12-02 20:35:45 -08:00
Tim Prouty
239f815e30 Add OneFS VFS module skeleton.
Also set configure to autodetect OneFS OS and build this VFS module.
2008-12-02 20:35:45 -08:00