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

35 Commits

Author SHA1 Message Date
Stefan Metzmacher
c43591c216 pvfs: add PVFS_RESOLVE_NO_OPENDB flag and get the write time from the opendb
By default get the current write time from the opendb,
but allow callers to pass PVFS_RESOLVE_NO_OPENDB
for performance reasons, if they don't need to the write time.

metze
(This used to be commit def52cc098)
2008-06-03 14:03:50 +02:00
Stefan Metzmacher
1f65ddb336 pvfs_unlink: disable async retries for wildcard deletes
We would setup multiple retries per client request.

metze
(This used to be commit 951764e284)
2008-03-15 12:22:36 +01:00
Stefan Metzmacher
61e17794c3 pvfs_unlink: retry unlink after oplock not granted
metze
(This used to be commit 746e89ce2e)
2008-02-26 09:32:59 +01:00
Stefan Metzmacher
599901c139 pvfs_unlink: move stream logic into pvfs_unlink_one()
metze
(This used to be commit 438032e12f)
2008-02-25 08:03:44 +01:00
Stefan Metzmacher
58745900d3 pvfs_unlink: splitup the logic into generic and file specific functions
metze
(This used to be commit 7572afdc26)
2008-02-25 08:03:43 +01:00
Stefan Metzmacher
0634c12abb pvfs_unlink: add a fast path for the non wildcard case
metze
(This used to be commit 83e6c99f78)
2008-02-25 08:03:42 +01:00
Stefan Metzmacher
d5414cdc63 pvfs_unlink: move !name->stream_exists into the caller
metze
(This used to be commit e01554e161)
2008-02-25 08:03:41 +01:00
Stefan Metzmacher
a56bd4fa82 pvfs_unlink: pass down union smb_unlink completely to sub functions
metze
(This used to be commit 8301189e94)
2008-02-25 08:03:40 +01:00
Stefan Metzmacher
63b15441f4 pvfs_unlink: pass down a struct pvfs_filename to pvfs_unlink_one()
metze
(This used to be commit 43ec7fa2d8)
2008-02-25 08:03:39 +01:00
Stefan Metzmacher
1cd2008aa4 pvfs: pass NULL to pvfs_can_*() when no odb_lock is needed by the caller
metze
(This used to be commit e585e23063)
2008-02-25 07:56:06 +01:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Andrew Tridgell
89efea81d9 r18319: fixed the directory search resume code on IRIX
The problem was twofold:

  1) irix returns 64 bit numbers in telldir(). The protocol uses a 32
     bit resume key. We now cope with this properly using the code in
     pvfs_list_seek_ofs().

  2) irix returns 0xFFFFFFFF from telldir() for the last entry in the
     directory. When added to DIR_OFFSET_BASE this became
     DIR_OFFSET_DOTDOT which meant an infinite loop!
(This used to be commit 8cce9740ed)
2007-10-10 14:18:08 -05:00
James Peach
6ab33938d5 r15186: Introduce ISDOT and ISDOTDOT macros for testing whether a filename is
"." for "..". These express the intention better that strcmp or strequal
and improve searchability via cscope/ctags.
(This used to be commit 7e4ad7e8e5)
2007-10-10 14:04:14 -05:00
Andrew Tridgell
ed3fc62871 r14797: added checking of the filter in notify requests
(This used to be commit 1db0a5a7f4)
2007-10-10 13:59:20 -05:00
Andrew Tridgell
3434cd778c r14616: added notify change support to the posix backend
It doesn't fully work yet, and doesn't yet have all the efficiency
that is planned, but it doesn't break anything and I wanted to get the
code in the tree to minimise the chance of collisions with the work
metze is doing.
(This used to be commit 1624ea88e6)
2007-10-10 13:59:02 -05:00
Stefan Metzmacher
307e43bb56 r14173: change smb interface structures to always use
a union smb_file, to abtract
- const char *path fot qpathinfo and setpathinfo
- uint16_t fnum for SMB
- smb2_handle handle for SMB2

the idea is to later add a struct ntvfs_handle *ntvfs
so that the ntvfs subsystem don't need to know the difference between SMB and SMB2

metze
(This used to be commit 2ef3f59709)
2007-10-10 13:56:57 -05:00
Stefan Metzmacher
86497db611 r14157: - pass a struct ntvfs_request to the ntvfs layer
(for now we just do #define ntvfs_request smbsrv_request,
   but it's the first step...)
- rename ntvfs_openfile() -> ntvfs_open()
- fix the talloc hierachie in some places in the ntvfs_map_*() code

metze
(This used to be commit ed9ed1f48f)
2007-10-10 13:56:55 -05:00
Andrew Tridgell
40a8d58551 r13739: a fairly major overhaul of the opendb code to allow the BASE-DELETE
test to pass. To try to make the code a bit more understandable, I
moved to using an IDL description of the opendb tdb record format.

One of the larger changes was to make directory opens and creates go
via the opendb code, so directory operations now obey all the share
mode restrictions, as well as delete on close semantics. I also
changed the period over which the opendb locks are held, to try to
minimise races due to two open operations happening at the same time.
(This used to be commit cd2602d057)
2007-10-10 13:52:08 -05:00
Andrew Tridgell
1c092c5ba6 r4406: - don't call the xattr unlink hook on unlink unless the link count is 1, otherwise
the xattrs of the remaining link are removed

- fix the handling of attribute set on directories
(This used to be commit fa44e3cce0)
2007-10-10 13:07:44 -05:00
Andrew Tridgell
a66a985cde r4314: added ACL checking on unlink
(This used to be commit f25c469693)
2007-10-10 13:07:33 -05:00
Andrew Tridgell
50005129ab r4242: added support for storing xattrs in a tdb. This allows all advanced NT
attributes (streams, EAs, NT ACLs, timestamps etc) to be used on
filesystems that don't support xattrs. It also allows for large
streams, although they are very inefficient.

I won't enable this by default, as I really wrote it as a way of
testing large stream support while still using ext3, but perhaps with
a bit more work this could be generally usable.

To enable this use:

   posix:eadb = /home/test/myeas.tdb
(This used to be commit 0c927d912c)
2007-10-10 13:07:28 -05:00
Andrew Tridgell
ae7caf08c1 r3798: added support for alternate data streams in xattrs into pvfs.
The trickiest part about this was getting the sharing and locking
rules right, as alternate streams are separate locking spaces from the
main file for the purposes of byte range locking, and separate for
most share violation rules.

I suspect there are still problems with delete on close with alternate
data streams. I'll look at that next.
(This used to be commit b6452c4a20)
2007-10-10 13:05:54 -05:00
Andrew Tridgell
187412f3da r3747: - added some of the infrastructure needed for streams support in pvfs
(the IDL, and the load/save meta-data logic)

- changed pvfs_resolve_name() to default to non-wildcard, needing
  PVFS_RESOLVE_WILDCARD to enable wildcards. Most callers don't want
  wildcards, so defaulting this way makes more sense.

- fixed deletion of EAs
(This used to be commit e7afd4403c)
2007-10-10 13:05:50 -05:00
Andrew Tridgell
0a8dff9e47 r3544: fixed some #include lines to make them more consistent
(This used to be commit a1a0118bd3)
2007-10-10 13:05:30 -05:00
Andrew Tridgell
ee7fa4812c r3262: - new pvfs_dirlist code that reopens the directory between search
calls. This is needed to allow for "new files appear during a search"
  behaviour

- pvfs now passes RAW-SEARCH
(This used to be commit 0d98f7653a)
2007-10-10 13:04:48 -05:00
Andrew Tridgell
e767d8d1b2 r3260: redid the pvfs_dirlist() interface in preparation for a "keep
directory open" implementation, as opposed to the "load the whole
directory" interface used now. This will be needed to pass RAW-SEARCH
(This used to be commit 692623c6c0)
2007-10-10 13:04:47 -05:00
Andrew Tridgell
e9820e1b6e r3240: - update the rules for what error codes should be given on the
different type of unlink an seach mismatches

- wildcard directory listings that have attribute
  FILE_ATTRIBUTE_DIRECTORY and match "." or ".." should be failed.

- don't set the write_time on SMBclose unless it is non-zero

- added much better support for setfileinfo and setpathinfo in pvfs

- better (and more efficient) handling of .. and . components in filenames
(This used to be commit 9305b07af3)
2007-10-10 13:04:45 -05:00
Andrew Tridgell
ee0c87b4c9 r3207: - reformat error msgs in BASE-DIR* tests
- added support for mandatory attributes in old style directory search

- we now pass BASE-DIR1 and BASE-DIR2
(This used to be commit efaa0eaec4)
2007-10-10 13:04:41 -05:00
Andrew Tridgell
5c95896499 r3189: improved the share_conflict() logic (both in terms of readability and
correctness). pvfs now passes the BASE-RENAME test.
(This used to be commit 4cf3f65a5c)
2007-10-10 13:04:38 -05:00
Andrew Tridgell
8af9b5e42e r3179: - fixed error return on utime failure
- formatting fix
(This used to be commit 8ca4d7c51e)
2007-10-10 13:04:37 -05:00
Andrew Tridgell
c1c696460b r3174: added pvfs_is_open() to allow us to check for open files on unlink. We
now pass BASE-UNLINK.
(This used to be commit f23a2f8538)
2007-10-10 13:04:36 -05:00
Stefan Metzmacher
dcad0f6fd4 r2751: this is a new ntvfs design which tries to solve:
- the stacking of modules
- finding the modules private data
- hide the ntvfs details from the calling layer
- I set NTVFS_INTERFACE_VERSION 0 till we are closer to release
  (because we need to solve some async problems with the module stacking)

metze
(This used to be commit 3ff03b5cb2)
2007-10-10 12:59:30 -05:00
Andrew Tridgell
a3cec511bb r2561: completely redid the ntvfs module chaining code, You can now do something like:
ntvfs handler = nbench posix

and the nbench pass-thru module will be called before the posix
module. The chaining logic is now much saner, and less racy, with each
level in the chain getting its own private pointer rather than relying
on save/restore logic in the pass-thru module.

The only pass-thru module we have at the moment is the nbench one
(which records all traffic in a nbench compatibe format), but I plan
on soon writing a "unixuid" pass-thru module that will implement the
setegid()/setgroups()/seteuid() logic for standard posix uid
handling. This separation of the posix backend from the uid handling
should simplify the code, and make development easier.

I also modified the nbench module so it can do multiple chaining, so
if you want to you can do:

   ntvfs module = nbench nbench posix

and it will save 2 copies of the log file in /tmp. This is really only
useful for testing at the moment until we have more than one pass-thru
module.
(This used to be commit f84c0af35c)
2007-10-10 12:59:06 -05:00
Andrew Tridgell
8a1c3ddd94 r2436: the second big lump of posix vfs code.
this is still just a skeleton, and many of the functions are just
based on the simple vfs backend, they are there to allow me to run
smbtorture tests against the real parts of the posix backend.
(This used to be commit f2fa7fe565)
2007-10-10 12:58:52 -05:00
Andrew Tridgell
03cb4367d6 r2404: the first large lump of posix vfs stuff.
this is still very much a skeleton (with many limbs missing too!). I
am committing this early to get some feedback on the approach taken.
(This used to be commit 40d5cae5eb)
2007-10-10 12:58:48 -05:00