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

1175 Commits

Author SHA1 Message Date
Volker Lendecke
0b1f3aea27 s3: Fix Coverity ID 2682: NULL_RETURNS 2012-04-19 17:37:39 +02:00
Andrew Bartlett
84ad848c86 s3-xattr_tdb: Remove dead code: talloc_stackframe() cannot fail
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr 19 14:15:42 CEST 2012 on sn-devel-104
2012-04-19 14:15:41 +02:00
Andrew Bartlett
492942a66a s3-xattr_tdb: Be nice to xattr_tdb_getxattr callers, return the full blob
In this case, the blob is already in memory, so it is easier to return the full
blob to the caller, and let the caller decide if some interface restriction
stops the full blob from being passed all the way up the stack.

This allows us to quickly write a python wrapper for this xattr storage
mechanism.

Andrew Bartlett
2012-04-18 12:05:00 +10:00
Andrew Bartlett
351c78fc67 s3-xattr_tdb: make xattr_tdb a private library, for use outside vfs_xattr_tdb 2012-04-18 12:05:00 +10:00
Jeremy Allison
fd38486364 Fix return_fn when aio was cancelled. We need to return -1, errno = ECANCELED. 2012-04-12 15:06:59 -07:00
Jeremy Allison
80a4e38d64 Fix the same bug reported by Kirill Malkin <kirill.malkin@starboardstorage.com> and
fixed by Volker for vfs_aio_fork as ref 0aacdbfada.

From that change:

    aio_suspend does not signal the main process with a signal, it just waits. The
    aio_fork module does not use the signal at all, it directly calls back into the
    main smbd by calling smbd_aio_complete_aio_ex. This is an abstraction
    violation, but the alternative would have been to use signals where they are
    not needed. However, in wait_for_aio_completion this bites us: With aio_fork we
    call handle_aio_completed twice on the same aio_ex struct: Once from the call
    to handle_aio_completion within the aio_fork module and once from the code in
    wait_for_aio_completion.

Fix this differently here by not calling directly back into smbd,
but using a new function aio_linux_setup_returns() to setup the
return values that wait_for_aio_completion() in the main smbd
will pick up by calling handle_aio_completd().
2012-04-12 15:06:58 -07:00
Volker Lendecke
f6328b14c8 s3: Fix a typo
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Thu Apr 12 23:38:24 CEST 2012 on sn-devel-104
2012-04-12 23:38:23 +02:00
Jeremy Allison
e02a788f60 Simplify the logic around doing an immediate event reschedule.
We don't need to do a talloc here, we already have a long-lived
pointer we can pass in as the private data.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Apr 11 08:05:47 CEST 2012 on sn-devel-104
2012-04-11 08:05:47 +02:00
Andrew Bartlett
f7d60899d6 build: Add tevent deps for users of tevent calls
This isn't strictly required - this isn't a build break at the moment,
but is a good practice to directly depend on the major libraries we
use, and helps us to have more fine-grained rather than global
dependencies.

Andrew Bartlett
2012-04-11 02:30:39 +02:00
Jeremy Allison
fe707f6549 Add a new module, aio_linux which implements Linux kernel aio support. Docs to follow.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Apr 11 02:29:04 CEST 2012 on sn-devel-104
2012-04-11 02:29:04 +02:00
Volker Lendecke
5856ab89fa s3: Initialize aio_pending_size from aio_pthread 2012-04-09 18:05:01 +02:00
Volker Lendecke
5f3ac4d6c4 s3: Initialize aio_pending_size from aio_pthread 2012-04-09 18:05:01 +02:00
Volker Lendecke
eff36099c1 s3: Move the aio signal init to the vfs module
On platforms that don't have an RT signal space, signal initialization
fails. aio_fork and aio_pthread don't need the signal, so this would
block them from running as well.
2012-04-09 18:04:55 +02:00
Jeremy Allison
a92c532573 Bug found by Herb. blkcnt_t st_ex_blksize is defined as a signed value. When it is
on a 32-bit system and defined as a long, then inside vfswrap_get_alloc_size()
we cast to a uint64_t. This sign-extends when converting to unsigned,
so if the high bit of st_ex_blksize is set we return insane values to clients.
2012-04-06 14:20:12 -07:00
Andrew Bartlett
6aa12fcb30 build: Remove SMB_OFF_T, replace with off_t
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-06 01:47:43 +02:00
Andrew Bartlett
19eee33d82 s3-vfs: Remove unused lremovexattr call from VFS modules, system.c and configure
If this is ever needed again, it would be more appropriate as an options argument
to removexattr.

Andrew Bartlett
2012-04-05 13:39:01 +10:00
Andrew Bartlett
c70ac29c54 s3-vfs: Remove unused lsetxattr call from VFS modules, system.c and configure
If this is ever needed again, it would be more appropriate as an options argument
to listxattr.

Andrew Bartlett
2012-04-05 13:39:00 +10:00
Andrew Bartlett
c5b17c5555 s3-vfs: Remove unused llistxattr call from VFS modules, system.c and configure
If this is ever needed again, it would be more appropriate as an options argument
to listxattr.

Andrew Bartlett
2012-04-05 13:39:00 +10:00
Andrew Bartlett
b2f7cfa848 s3-vfs: Remove unused lgetxattr call from VFS modules, system.c and configure 2012-04-05 13:39:00 +10:00
Andrew Bartlett
f6e0532024 build: Remove SMB_STRUCT_DIR define 2012-04-05 02:39:09 +02:00
Andrew Bartlett
2320b2144f build: Remove SMB_STRUCT_DIRENT define 2012-04-05 02:39:09 +02:00
Andrew Bartlett
6edd8e95f1 build: Remove sys_rewinddir wrapper 2012-04-05 02:39:09 +02:00
Andrew Bartlett
3e8a6e5760 build: Remove sys_closedir wrapper 2012-04-05 02:39:09 +02:00
Andrew Bartlett
ecc822faf8 build: Remove sys_telldir wrapper 2012-04-05 02:39:09 +02:00
Andrew Bartlett
900473a45b build: Remove sys_seekdir wrapper 2012-04-05 02:39:09 +02:00
Andrew Bartlett
afdb78075c build: Remove sys_readdir wrapper 2012-04-05 02:39:09 +02:00
Andrew Bartlett
fe526bb32b build: Remove sys_opendir wrapper 2012-04-05 02:39:09 +02:00
Andrew Bartlett
d166b79852 build: Remove sys_open wrapper 2012-04-05 02:39:08 +02:00
Andrew Bartlett
43e9be8894 build: Remove sys_lseek wrapper 2012-04-05 02:39:08 +02:00
Andrew Bartlett
5c89d12ca4 build: Remove sys_ftruncate wrapper 2012-04-05 02:39:08 +02:00
Andrew Bartlett
214a668ff3 Remove off64_t declarations 2012-04-05 02:39:08 +02:00
Andrew Bartlett
da50ff7f84 s3-vfs: initial work on posix:eadb module
This is a module that, like vfs_xattr_tdb, stores extended attributes
in a DB on disk.  This uses the format needed to support the
posix:eadb smb.conf option.

Andrew Bartlett
2012-04-03 14:35:02 +10:00
Volker Lendecke
0aacdbfada s3-aio-fork: Fix a segfault in vfs_aio_fork
aio_suspend does not signal the main process with a signal, it just waits. The
aio_fork module does not use the signal at all, it directly calls back into the
main smbd by calling smbd_aio_complete_aio_ex. This is an abstraction
violation, but the alternative would have been to use signals where they are
not needed. However, in wait_for_aio_completion this bites us: With aio_fork we
call handle_aio_completed twice on the same aio_ex struct: Once from the call
to handle_aio_completion within the aio_fork module and once from the code in
wait_for_aio_completion.

This patch fixes it in a pretty bad way by introducing flag variables and more
state. But the mid-term plan is to replace the posix aio calls from the vfs and
do pread_send/recv and pwrite_send/recv at the vfs layer, so this will
significantly change anyway.

Thanks to Kirill Malkin <kirill.malkin@starboardstorage.com> for reporting this
crash!

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Sat Mar 31 15:25:55 CEST 2012 on sn-devel-104
2012-03-31 15:25:54 +02:00
Volker Lendecke
7f7c2d721d s3-aio-fork: Fix aio_suspend event hierarchy
We end up here multiple times. There's no real point putting the events into
the child struct, at the end of this routine we need to free them anyway.
2012-03-31 13:51:17 +02:00
Volker Lendecke
aef86982b8 s3-aio-fork: Fix an alignment warning on OS/X 2012-03-31 13:51:17 +02:00
Jeremy Allison
959516d61b More strlcat/strlcpy truncate checks. 2012-03-30 21:26:07 +02:00
Volker Lendecke
fa6f61e835 s3: Pass filters explicitly through vfs notify watch
This removes a dependency on "struct notify_entry" and makes the nature of the
API more explicit. We depend upon the VFS module to mask out elements from
e->filter and e->subdir_filter that it took over to handle.

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Mar 26 17:45:44 CEST 2012 on sn-devel-104
2012-03-26 17:45:43 +02:00
Jelmer Vernooij
c0288e0612 lib/util: Remove obsolete sys_getpid() and sys_fork().
The performance of these is minimal (these days) and they can return
invalid results when used as part of applications that do not use
sys_fork().

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104
2012-03-24 21:55:40 +01:00
Christian Ambach
8718c7b88d s3:vfs_gpfs: fix some compiler warnings
Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Thu Mar 22 20:14:34 CET 2012 on sn-devel-104
2012-03-22 20:14:34 +01:00
Christian Ambach
0a37ca5210 s3:vfs_gpfs: remove fallback to linux_setlease
if setting the lease in GPFS failed, there is not much sense in trying
to set a lease just locally that would not inform us of openers
on other cluster nodes
2012-03-22 18:41:22 +01:00
Christian Ambach
a551ee5f22 s3:vfs_gpfs: correct use of profiling macros
under certain conditions START_PROFILE could have been called, but no END_PROFILE
2012-03-22 18:41:22 +01:00
Christof Schmitt
0a896094c6 s3:vfs_gpfs: Implement fallocate callback for GPFS
GPFS provides the gpfs_prealloc call. Implement the fallocate
callback with mode VFS_FALLOCATE_EXTEND_SIZE using this call.
There is no support for VFS_FALLOCATE_KEEP_SIZE, so report
this mode as not available.
2012-03-22 18:41:22 +01:00
Christof Schmitt
62616784ae s3:vfs_gpfs: Report disk space and usage on GPFS share according to quotas
When a client requests the information about free space and space used,
adjust the reported values according to quotas in the GPFS file system:

- Retrieve quotas for the current user, current group and fileset for
  the top level of the share.
- If the soft block quota grace time has expired, report disk as full.
- If a hard block quota has been exceeded, report disk as full.
- If none of the hard block quotas been exceeded, report
  share size and free space according to the lowest limits found in
  the quotas.
- If no applicable hard block quota has been set, report the
  information from the statfs call.

This feature is disabled by default and has to be enabled by setting the
option gpfs:dfreequota.
2012-03-22 18:41:22 +01:00
Christof Schmitt
a9cfd80d87 s3:vfs_gpfs: add GPFS api calls for quota and free space reporting
Add the GPFS api calls for reporting the quotas and free space:
- get_gpfs_quota for querying a quota
- get_gpfs_fset_id for mapping a path to a fileset id
2012-03-22 18:41:22 +01:00
Michael Adam
2619eae626 s3:vfs_tsmsm: Fix a misspelling of a config parameter in the doc-comment
The module uses "tsmsm:dmapi attribute" instead of "tsmsm:attribute name".
2012-03-22 00:21:56 +01:00
Volker Lendecke
6a2bf12f6a s3: Remove "conn" from sys_notify_context 2012-03-21 12:52:09 +01:00
Volker Lendecke
4319076cca s3: Pass "path" through vfs_notify_watch 2012-03-21 12:52:09 +01:00
Jeremy Allison
9d7444bfce Fix second part of bug #8811 - sd_has_inheritable_components segfaults on an SD that se_access_check accepts.
This fixes a coredump with a NULL DACL in add_directory_inheritable_components().

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Mar 17 01:05:57 CET 2012 on sn-devel-104
2012-03-17 01:05:57 +01:00
Brad Smith
f0bba969d8 s3: Improve statvfs support
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Sun Mar 11 14:18:04 CET 2012 on sn-devel-104
2012-03-11 14:18:04 +01:00
Brad Smith
8bdc289099 s3: Further fix for bug 8777 2012-03-02 10:30:07 +01:00