22 Commits

Author SHA1 Message Date
Niels de Vos
e501a7da4c fuse: add support for SEEK_HOLE and SEEK_DATA through lseek()
The Linux FUSE kernel module has gained support for passing SEEK_HOLE
and SEEK_DATA on through lseek(). This can greatly improve performance
when working with sparse files.

Linux FUSE introduced support for lseek() with version 4.5. The commit
in mainline Linux is 0b5da8db145bfd44266ac964a2636a0cf8d7c286.

URL: http://thread.gmane.org/gmane.comp.file-systems.fuse.devel/14752
Change-Id: I12496d788e59461a3023ddd30e0ea3179007f77e
BUG: 1220173
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/11474
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
2016-02-10 22:16:50 -08:00
Ravishankar N
ff12c4a83b fuse: update fuse_kernel.h to version 23
The following changes were made upstream:
 - add FUSE_WRITEBACK_CACHE
 - add time_gran to fuse_init_out
 - add reserved space to fuse_init_out
 - add FATTR_CTIME
 - add ctime and ctimensec to fuse_setattr_in
 - add FUSE_RENAME2 request
 - add FUSE_NO_OPEN_SUPPORT flag

Including these changes will make it easier to backport support for
lseek().

Because the fuse_init_out structure changed its size, older versions of
FUSE would fail initializing. When an older version of FUSE is detected,
the fuse_init_out structure is reduced to the previous size. This is
harmless, as the attributes that are not passed, are not used for
earlier versions anyway.

BUG: 1220173
Change-Id: I58c74e161638b2d4ce12fc91a206fdc1b96de14d
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
[ndevos: splitted from http://review.gluster.org/11474
         old version fuse_init_out size correction]
Reviewed-on: http://review.gluster.org/11537
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
2016-02-06 21:56:46 -08:00
Harshavardhana
1b74cf9929 porting: Port for FreeBSD rebased from Mike Ma's efforts
- Provides a working Gluster Management Daemon, CLI
- Provides a working GlusterFS server, GlusterNFS server
- Provides a working GlusterFS client
- execinfo port from FreeBSD is moved into ./contrib/libexecinfo
  for ease of portability on NetBSD. (FreeBSD 10 and OSX provide
  execinfo natively)
- More portability cleanups for Darwin, FreeBSD and NetBSD
- Provides a new rc script for FreeBSD

Change-Id: I8dff336f97479ca5a7f9b8c6b730051c0f8ac46f
BUG: 1111774
Original-Author: Mike Ma <mikemandarine@gmail.com>
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8141
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-07-02 17:20:34 -07:00
Harshavardhana
a3cb38e3ed build: MacOSX Porting fixes
git@forge.gluster.org:~schafdog/glusterfs-core/osx-glusterfs

Working functionality on MacOSX

 - GlusterD (management daemon)
 - GlusterCLI (management cli)
 - GlusterFS FUSE (using OSXFUSE)
 - GlusterNFS (without NLM - issues with rpc.statd)

Change-Id: I20193d3f8904388e47344e523b3787dbeab044ac
BUG: 1089172
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Dennis Schafroth <dennis@schafroth.com>
Reviewed-on: http://review.gluster.org/7503
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-04-24 14:41:48 -07:00
Brian Foster
fbc5436335 fuse: sync fuse_kernel.h from linux 3.11.0(-rc3) header
The linux 3.11 fuse kernel header supports up through version 7.22.
Gluster has incrementally supported versions up to 7.22. This is a
hard sync of the most recent kernel header to resolve various,
minor descrepencies and facilitate updates going forward. The
following changes are included:

- Re-typed data structure definitions.
- Missing comments and init flag definitions (i.e., splice).
- Code format and whitespace differences.

No functional changes are included.

BUG: 990744
Change-Id: I86921ef7be56d31bab332cf8589262c2b9348221
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.org/5490
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-08-03 05:50:11 -07:00
Brian Foster
dc72dd5a76 fuse-bridge: update to protocol minor version 22
7.17
- Distinguishes between POSIX and BSD locking support via a
  separate BSD locking support init flag. Older protocol versions
  (since BSD support was added) export both types of locking
  requests if FUSE_POSIX_LOCKS is specified. Gluster sets this
  flag, so set FUSE_FLOCK_LOCKS as well on kernels that support
  version 17 or newer.

7.18
- Adds ioctl() support for directories (and the associated
  FUSE_IOCTL_DIR flag). Gluster does not support the ioctl
  request, so no changes are required. Update the header.
- Adds support for the delete notification to allow a filesystem
  to inform the kernel of a deleted inode. No gluster changes
  required.

7.19
- Adds support for the fallocate request. Gluster already supports
  fallocate and includes the request opcode definition and data
  structure. Update the header version number.

7.20
- Adds the FUSE_AUTO_INVAL_DATA init flag to enable attribute
  updates on reads and automatic cache invalidation on mtime
  changes. Behavior does not change unless the init flag is
  specified, no gluster changes required. Update header.

7.21
- Adds readdirplus support and updates the poll request to include
  events. Gluster already supports readdirplus and includes the
  relevant data structures. Poll is not supported, so no changes
  are required. Update the header with some missing
  READDIRPLUS_AUTO bits.

7.22
- Adds real asynchronous direct I/O support. Gluster already
  supports/enables the associated bit (FUSE_ASYNC_DIO), no further
  changes are required. Update the header.

BUG: 990744
Change-Id: Idf6fd75bbd48189587e548f7624626f9a75309e8
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.org/5489
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-08-03 05:48:44 -07:00
Brian Foster
bc9cf5ba83 fuse-bridge: update to fuse protocol minor version 16 (Linux)
7.14
- Splice write support to fuse device node. No gluster changes
  required besides header update.

7.15
- Store/retrieve notification support. No gluster changes
  required besides header update.

7.16
- BATCH_FORGET request support. Implement a handler for
  BATCH_FORGET requests and update the header.
- Updated ioctl() ABI. No gluster changes required besides
  header update.

BUG: 990744
Change-Id: If3061a720ba566ee6731ad8b77cdc665d8fbf781
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.org/5449
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-08-01 21:02:26 -07:00
Brian Foster
d1ccc4e400 gluster: add fallocate fop support
Implement support for the fallocate file operation. fallocate
allocates blocks for a particular inode such that future writes
to the associated region of the file are guaranteed not to fail
with ENOSPC.

This patch adds fallocate support to the following areas:

	- libglusterfs
	- mount/fuse
	- io-stats
	- performance/md-cache,open-behind
	- quota
	- cluster/afr,dht,stripe
	- rpc/xdr
	- protocol/client,server
	- io-threads
	- marker
	- storage/posix
	- libgfapi

BUG: 949242
Change-Id: Ice8e61351f9d6115c5df68768bc844abbf0ce8bd
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.org/4969
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-06-13 14:37:21 -07:00
Brian Foster
8a7cda772d mount/fuse: enable fuse real async dio when available
fuse has support for optimized async. direct I/O handling via the
FUSE_ASYNC_DIO init flag. Enable FUSE_ASYNC_DIO when advertised
by fuse.

performance/write-behind: fix dio hang

Also fix a hang observed during aio-stress testing due to conflicting
request handling in write-behind. Overlapping requests are skipped
in pick_winds and may never continue when the conflicting write in
progress returns. Add a wb_process_queue() call after a non-wb request
completes to keep the queue moving.

BUG: 963258
Change-Id: Ifba6e8aba7a7790b288a32067706b75f263105d4
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.org/5014
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-05-15 17:19:06 -07:00
Anand Avati
78ae721561 fuse-bridge: use READDIRPLUS support when available
This patch makes use of READDIRPLUS call when support is available
in the kernel.

Change-Id: Iac78881179567856b55af1f46594a2b2859309f0
BUG: 908128
Signed-off-by: Anand V. Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/3905
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
2013-02-07 10:26:27 -08:00
Avra Sengupta
777d395fea core: fixes for gcc's '-pedantic' flag build
* warnings on 'void *' arguments
* warnings on empty initializations
* warnings on empty array (array[0])

Change-Id: Iae440f54cbd59580eb69f3ecaed5a9926c0edf95
BUG: 875913
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4219
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-21 22:17:36 -08:00
Niels de Vos
702b291297 fuse: handle mountflags properly
The internal mount API had no access to the generic
mountflags used by mount(2).

Thus the "ro" mount option that needs to be passed down to mount(2) as
as a mountflag was incorrectly mangled into the fuse-specific mount
parameter string (cf. http://review.gluster.com/655).

This commit fixes the internal API and the "ro" issue. It also adds a
check for the "rw" and "ro" mount options in tests/basic/mount.t.

Thanks to Csaba Henk (csaba@) for suggestions and proposing an updated
patch.

Change-Id: I7f7bf49ae44d148f5c16f10736a0e412fb8f5e67
BUG: 853895
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/4163
Reviewed-by: Csaba Henk <csaba@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-11-19 00:49:36 -08:00
Csaba Henk
6012dfe6b9 fuse: reorganize mounting code
Macro-driven conditional compilation was a chaos.

New scheme is:

contrib/fuse-lib/mount-common.c:
  libfuse routines used both by glusterfs and fusermount
contrib/fuse-lib/mount.c:
  libfuse-derived but customized mounting code for glusterfs
contrib/fuse-util/mount_util.c:
  libfuse routines used only by fusermount

Change-Id: I3e0ba7f74e36556b78244cd7676eb4d379939602
BUG: 762389
Signed-off-by: Csaba Henk <csaba@redhat.com>
Reviewed-on: http://review.gluster.com/3342
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-05-21 13:47:41 -07:00
Jeff Darcy
7d0397c214 fuse: allow requests during mount (needed for SELinux labels)
Change-Id: Ia1af402897e6a7290acf79617c34fdc804751729
BUG: 811217
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.com/3199
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-04-23 14:37:24 -07:00
Csaba Henk
c5d781e055 upon daemonizing, wait on mtab update to terminate in parent
This fixes the race in between the mtab update attempts of mount and umount
when we do a lazy umount right after mounting, in order to hide the given fs
instance; yet this way we still avoid the deadlock of the fs and mount which
we can hit if we wait unconditionally for the mtab update to terminate (cf.
bz #511).

Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2690 (race between mtab updates of mount and umount)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2690
2011-05-19 15:41:47 -07:00
Vijay Bellur
2854c55934 Copyright changes
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 971 (dynamic volume management)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
2010-10-11 07:31:12 -07:00
Pavan Sondur
fd2e7d007e Changes to replace flock with gf_flock across GlusterFS.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 865 (Add locks recovery support in GlusterFS)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=865
2010-10-01 05:05:53 -07:00
Csaba Henk
18d982e6d0 OS X: basic additions for OS X client support
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 361 (GlusterFS 3.0 should work on Mac OS/X)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=361
2010-05-21 00:31:41 -07:00
Csaba Henk
4b233c6341 Upgrade FUSE protocol to rev. 7.13
2.6.32 will feature FUSE proto 7.13 which lets us tune the maximal number of
in-kernel backgrounded requests via INIT.

Hereby we live up to this enhancement.

Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 385 (Upgrade FUSE protocol to rev. 7.13)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=385
2009-11-16 02:17:41 -08:00
Vijay Bellur
0b1197defa Changed occurrences of Z Research to Gluster.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
2009-10-07 03:54:49 -07:00
Csaba Henk
fbb636390f fuse: add proper mounting support, based on libfuse routines 2009-08-12 06:21:04 -07:00
Csaba Henk
472ac9944b fuse: move libfuse derived code over under contrib/ 2009-08-12 06:21:04 -07:00