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

90 Commits

Author SHA1 Message Date
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
Christian Ambach
e87d98c0fc s3:vfs_gpfs:quieten an expectable warning message
Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Fri Feb 10 20:14:12 CET 2012 on sn-devel-104
2012-02-10 20:14:12 +01:00
Christian Ambach
4a11be3fb4 s3:vfs_gpfs: fix a compiler warning 2012-02-10 18:11:30 +01:00
Christof Schmitt
8ce9982be9 s3:vfs_gpfs:Fix query of creation time from GPFS
Setting the creation time through SetFileTime on a GPFS file system and
querying it with GetFileTime shows a mismatch.

The vfs_gpfs module first retrieves the information from the operating
system and the flag st_ex_calculated_birthtime is set to false. When
vfs_gpfs retrieves the birthtime from GPFS the flag
st_ex_calculated_birthtime has to be set to true. Otherwise the birth
time will get overwritten by a call to update_stat_ex_mtime, reporting
the wrong time to a client system.

Signed-off-by: Christian Ambach <ambi@samba.org>
2012-02-10 18:10:43 +01:00
Stefan Metzmacher
318346a937 s3:vfs_gpfs: make "gpfs:getrealfilename" a per share option
metze

Signed-off-by: Christian Ambach <ambi@samba.org>
2012-02-10 18:08:01 +01:00
Stefan Metzmacher
8ad2b6a55e s3:vfs_gpfs: make "gpfs:ftruncate" a per share option
metze

Signed-off-by: Christian Ambach <ambi@samba.org>
2012-02-10 17:54:10 +01:00
Stefan Metzmacher
89a4f66826 s3:vfs_gpfs: make "gpfs:winattr" a per share option
metze

Signed-off-by: Christian Ambach <ambi@samba.org>
2012-02-10 17:54:10 +01:00
Stefan Metzmacher
2e95d8048b s3:vfs_gpfs: be less verbose in get/set_xattr functions
metze

Signed-off-by: Christian Ambach <ambi@samba.org>
2012-02-10 17:54:10 +01:00
Volker Lendecke
17986097a3 s3: Split a line with 1 statements
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Jan 12 13:10:19 CET 2012 on sn-devel-104
2012-01-12 13:10:19 +01:00
Christian Ambach
851b9e9183 s3:vfs fix up vfs_gpfs after function pointer renames
In 422494a8e6, vfs_gpfs.c was forgotten

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Thu Dec 15 21:08:02 CET 2011 on sn-devel-104
2011-12-15 21:08:02 +01:00
Christian Ambach
6753656c74 s3:vfs:gpfs fix some compiler warnings 2011-11-24 17:24:58 +01:00
Christian Ambach
db1abd4d2d s3:vfs:gpfs convert syncio parameter
convert syncio parameter to be stored in the VFS handle data
this removes the need to go through lp_parm_bool() on each open
2011-11-24 15:52:09 +01:00
Gregor Beck
2ddfbbbdba gpfs.so: Add gpfs:syncio option
This enables optimizations for shared file access on gpfs
2011-05-16 13:58:24 +02:00
Jeremy Allison
7d6ebe0de7 More const fixes. Remove CONST_DISCARD. 2011-05-06 01:44:07 +02:00
Volker Lendecke
41bde55821 vfs_gpfs: Block sendfile for offline files 2011-05-04 16:11:30 +02:00
Volker Lendecke
2329fb56a7 vfs_gpfs: Store the winattrs in st.vfs_private
This avoids a considerable amount of gpfs_winattr calls
2011-05-04 16:11:30 +02:00
Christian Ambach
7a4cff842d s3:vfs use gpfs_lib_init
With newer GPFS releases, libgpfs contains a function
gpfs_lib_init(). It marks the pseudo-device the lib uses
as interface to the GPFS kernel module to not be to
destroyed after each call to GPFS.
This saves us some microseconds creating and removing the device
each time we do a call to libgpfs.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Apr 26 20:52:36 CEST 2011 on sn-devel-104
2011-04-26 20:52:36 +02:00
Volker Lendecke
83a0b94cf8 s3: Fix the build of vfs_gpfs.c
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Apr 18 14:40:07 CEST 2011 on sn-devel-104
2011-04-18 14:40:07 +02:00
Björn Jacke
dca465fa53 s3/vfs_gpfs: s/syncops/gpfs
as pointed out by Metze in bug #8031

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Tue Apr  5 18:08:42 CEST 2011 on sn-devel-104
2011-04-05 18:08:42 +02:00
Günther Deschner
45364f5e69 s3-vfs: include smbd/smbd.h in vfs modules.
Guenther
2011-03-30 01:13:08 +02:00
Volker Lendecke
4afda9ebf4 s3: Pass the aio_force operation through vfs_gpfs
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Mar  2 19:24:27 CET 2011 on sn-devel-104
2011-03-02 19:24:27 +01:00
Volker Lendecke
6405e341b9 s3: Ask GPFS for the IS_OFFLINE operation 2011-03-02 18:39:21 +01:00
Volker Lendecke
73ce3e156e s3: Announce HSM in the gpfs module 2011-03-02 18:39:21 +01:00
Volker Lendecke
358f031ccf s3: GPFS can't deal with mangled names
In getrealfilename, avoid calling the GPFS function
2011-03-02 10:46:11 +01:00
Volker Lendecke
242a63e95a s3: Fix a 64-bit warning in vfs_gpfs.c
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Feb 25 14:56:51 CET 2011 on sn-devel-104
2011-02-25 14:56:51 +01:00
Volker Lendecke
148252331a s3: Improve an error msg in vfs_gpfs
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Feb 23 14:12:39 CET 2011 on sn-devel-104
2011-02-23 14:12:39 +01:00
Rusty Russell
385d925f7e s3:vfs:gpfs: fix logic when gpfs:winattr is false (the default!)
On my autocluster setup, it's not set.  Maybe it should be?  Otherwise
smbclient and some Windows client programs will get errors like:

        # smbclient //localhost/data -Uadministrator%XXX
        Domain=[VSOFS1] OS=[Unix] Server=[Samba 3.4.2-ctdb-10]
        smb: \> put /etc/resolv.conf resolv.conf
        NT_STATUS_ACCESS_DENIED closing remote file \resolv.conf
        smb: \>

Caused by attempting to update the time on close.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Michael Adam <obnox@samba.org>
2011-01-21 10:10:02 +01:00
Björn Jacke
9634d03339 s3/vfs_gpfs: map SPARSE attribute to/from WINATTRs, too 2010-12-17 21:11:04 +01:00
Volker Lendecke
24ef932a61 s3: Make gpfs winattrs work again
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Oct 27 15:32:00 UTC 2010 on sn-devel-104
2010-10-27 15:31:59 +00:00
Christian Ambach
beb5afea54 s3:gpfs: Add support for the gpfs_ftruncate call
ported from the v3-4-ctdb branch to master
This used to be commit 1f138cc9f4a

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Oct 13 13:34:25 UTC 2010 on sn-devel-104
2010-10-13 13:34:25 +00:00
Christian Ambach
22018b8b88 s3:vfs:gpfs convert sharemodes/leases parameter
convert gpfs:sharemodes and gpfs:leases parameters from a global setting
to a per share setting
2010-10-13 12:53:16 +00:00
Günther Deschner
7f6bb48bdf s3-secdesc: remove "typedef struct security_descriptor SEC_DESC".
Guenther
2010-05-18 12:30:12 +02:00
Abhidnya P Chirmule
ac774c4969 s3: Add access_mask to the flock VFS call 2009-10-06 18:52:06 +02:00
Volker Lendecke
50f248a06c s3: Forgot to check in one build failure for vfs_gpfs.c 2009-09-24 13:11:46 +02:00
Volker Lendecke
69447de175 s3: Remove an unused variable 2009-09-24 13:11:46 +02:00
Volker Lendecke
568f818a0f s3: Make the vfs_gpfs compile at least
Not sure whether it works in this state :-)
2009-09-24 12:55:14 +02:00
Abhidnya Chirmule
277597de85 To set file create/birth time in GPFS. Signed-off-by: Abhidnya Chirmule <achirmul@in.ibm.com> 2009-09-17 02:24:13 +02:00
Volker Lendecke
c54a8db006 Make refusal of SEC_DESC_DACL_PROTECTED configurable
This adds a parameter "gpfs:refuse_dacl_protected" that defaults to false.

GPFS has no place to store the SEC_DESC_DACL_PROTECTED ACL bit. With this
parameter we give customers an option to either ignore this bit or refuse
setting an ACL with it.
2009-08-19 11:39:44 +02:00
Volker Lendecke
033185e2a1 Make the smbd VFS typesafe 2009-07-24 11:42:05 -04:00
Tim Prouty
c9b8a01714 s3: Finish plumbing the fsp->fsp_name smb_fname conversion through the modules. 2009-07-20 17:26:57 -07:00
Christian Ambach
bd58a14617 reject ACLs with DESC_DACL_PROTECTED on GPFS
as GPFS does not support the ACE4_FLAG_NO_PROPAGATE NFSv4 flag (which would be the mapping for the DESC_DACL_PROTECTED flag), the status of this flag is currently silently ignored by Samba. That means that if you deselect the "Allow inheritable permissions..." checkbox in Windows' ACL dialog and then apply the ACL, the flag will be back immediately.

To make sure that automatic migration with e.g. robocopy does not lead to ACLs silently (and unintentionally) changed, this patch adds an explicit check for this flag and if set, it will return NT_STATUS_NOT_SUPPORTED so errors are shown up on the Windows side and the Administrator is aware of the ACLs not being settable like intended

Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
2009-07-14 09:21:26 +02:00
Tim Prouty
e129384d7c s3: Plumb smb_filename through SMB_VFS_STAT and SMB_VFS_LSTAT
This patch introduces two new temporary helper functions
vfs_stat_smb_fname and vfs_lstat_smb_fname.  They basically allowed me
to call the new smb_filename version of stat, while avoiding plumbing
it through callers that are still too inconvenient.  As the conversion
moves along, I will be able to remove callers of this, with the goal
being to remove all callers.

There was also a bug in create_synthetic_smb_fname_split (also a
temporary utility function) that caused it to incorrectly handle
filenames with ':'s in them when in posix mode.  This is now fixed.
2009-06-24 21:15:25 -07:00
Volker Lendecke
e0a6a344be Support getting gpfs birthtime 2009-06-02 18:15:20 +02:00
Mathias Dietz
15e10c6a84 Store winattrs in GPFS
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-02 17:03:59 +02:00
Volker Lendecke
49ca690b4b Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STAT
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-26 17:48:23 +02:00
Volker Lendecke
f024ca961e Use SMB_VFS_NEXT_CLOSE. This VFS stuff is really opaque to me...
Thanks Michael to provide some transparency :-)
2009-05-20 15:44:27 +02:00
Volker Lendecke
54973d0422 Fix bug disclosed by lock8 torture test
We have to drop the gpfs level share modes, regardless of whether we put
the file into the pending close queue.
2009-05-20 15:15:57 +02:00
Volker Lendecke
a2d5fe4a05 Make some functions static to vfs_gpfs.c 2009-04-06 13:29:59 +02:00
Volker Lendecke
54c2fe6583 Fix two c++ warnings in vfs_gpfs.c 2009-04-06 13:29:59 +02:00