24 Commits

Author SHA1 Message Date
Amar Tumballi
0419d9ab93 fuse: reflect the actual default for lru-limit option
in both `--help` text and man page

updates: bz#1679998
Change-Id: I9aa9367c6863ac8e2403255280697c9e6be26cf0
Signed-off-by: Amar Tumballi <amarts@redhat.com>
2019-02-25 15:26:08 +00:00
Raghavendra Gowdappa
a229ee1c8c mount/fuse: expose auto-invalidation as a mount option
Auto invalidation is necessary when same (meta)data is shared/access
across multiple mounts. However, if (meta)data is not shared, all
relevant I/O goes through the cache of single mount and hence is
coherent with (meta)data on bricks always. So, fuse-auto-invalidation
can be disabled for this case which gives a huge performance boost for
workloads that write data and then immediately read the data they just
wrote.

From glusterfs --help,

<snip>
      --auto-invalidation[=BOOL]   controls whether fuse-kernel can
                             auto-invalidate attribute, dentry and page-cache.
                             Disable this only if same files/directories are
                             not accessed across two different mounts
                             concurrently [default: "on"]
</snip>

Details on how disabling auto-invalidation helped to reduce pgbench
init times can be found at [1]. Time taken for pgbench init of scale
8000 was 8340s. That will be an improvement of 86% (59280s vs 8340s)
with auto-invalidations turned off along with other
optimizations. Just disabling auto-invalidation contributed 56%
improvement by reducing the total time taken by 33260s.

[1] https://www.spinics.net/lists/gluster-devel/msg25907.html

Change-Id: I0ed730dba9064bd9c576ad1800170a21e100e1ce
Signed-off-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
updates: bz#1664934
2019-02-02 03:07:35 +00:00
Amar Tumballi
d49b41e817 fuse: add --lru-limit option
The inode LRU mechanism is moot in fuse xlator (ie. there is no
limit for the LRU list), as fuse inodes are referenced from
kernel context, and thus they can only be dropped on request of
the kernel. This might results in a high number of passive
inodes which are useless for the glusterfs client, causing a
significant memory overhead.

This change tries to remedy this by extending the LRU semantics
and allowing to set a finite limit on the fuse inode LRU.

A brief history of problem:

When gluster's inode table was designed, fuse didn't have any
'invalidate' method, which means, userspace application could
never ask kernel to send a 'forget()' fop, instead had to wait
for kernel to send it based on kernel's parameters. Inode table
remembers the number of times kernel has cached the inode based
on the 'nlookup' parameter. And 'nlookup' field is not used by
no other entry points (like server-protocol, gfapi etc).

Hence the inode_table of fuse module always has to have lru-limit
as '0', which means no limit. GlusterFS always had to keep all
inodes in memory as kernel would have had a reference to it.
Again, the reason for this is, kernel's glusterfs inode reference
was pointer of 'inode_t' structure in glusterfs. As it is a
pointer, we could never free it (to prevent segfault, or memory
corruption).

Solution:

In the inode table, handle the prune case of inodes with 'nlookup'
differently, and call a 'invalidator' method, which in this case is
fuse_invalidate(), and it sends the request to kernel for getting
the forget request.

When the kernel sends the forget, it means, it has dropped all
the reference to the inode, and it will send the forget with the
'nlookup' parameter too. We just need to make sure to reduce the
'nlookup' value we have when we get forget. That automatically
cause the relevant prune to happen.

Credits: Csaba Henk, Xavier Hernandez, Raghavendra Gowdappa, Nithya B

fixes: bz#1560969
Change-Id: Ifee0737b23b12b1426c224ec5b8f591f487d83a2
Signed-off-by: Amar Tumballi <amarts@redhat.com>
2018-12-14 17:34:28 +00:00
Csaba Henk
1322274eef mount,fuse: make fuse dumping available as mount option
Updates: bz#1193929
Change-Id: I4dd4d0e607f89650ebb74b893b911b554472826d
Signed-off-by: Csaba Henk <csaba@redhat.com>
2018-05-04 17:42:12 +00:00
Csaba Henk
2ac79ed804 fuse: add support for kernel writeback cache
- Added kernel-writeback-cache command line and xlator
  option for requesting utilisation of the writeback
  cache of the kernel in FUSE_INIT (see [1]).
- Added attr-times-granularity command line and xlator
  option via which granularity of the {a,m,c}time in
  stat (attr) data that we support can be indicated to
  kernel. This is a means to avoid divergence of the
  attr times between kernel and userspace that could
  occur with writeback-cache, while still maintaining
  maximum time precision the FUSE server is capable of
  (see [2]).
- Handling FATTR_CTIME flag in FUSE_SETATTR that
  indicates presence of ctime in setattr payload.
  Currently we cannot associate arbitrary ctimes to
  files on backend, so we just touch them to update
  their ctimes to current time. Having ctimes in setattr
  payload is also a side effect of writeback cache
  (see [3] and [4]).

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4d99ff8,
     "fuse: Turn writeback cache on"
[2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e27c9d3,
     "fuse: fuse: add time_gran to INIT_OUT"
[3]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1e18bda,
     "fuse: add .write_inode"
[4]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ab9e13f,
     "fuse: allow ctime flushing to userspace"

Updates: #435
Change-Id: Id174c8e0c815c4456c35f8c53e41a6a507d91855
Signed-off-by: Csaba Henk <csaba@redhat.com>
2018-05-04 17:42:12 +00:00
Csaba Henk
5b46d55660 client: make fuse direct I/O strategies explicit
So far the --direct-io-mode option has been presented
as of being Boolean valued. That is however not exact,
as a third behavior is chosen if the option is not
specified.

We accept now the "auto" value as an explicit choice
for the default heuristics, and indicate in the
descriptions of the option (which occur in commandline
help and in the gluterfs / mount.glusterfs man pages)
that auto is the default.

The default heuristics was briefly described in the
commandline help. We are getting rid of that, because:
- it's not the right place to provide such details;
- there is no guarantee of keeping the current heuristics
  so it might go out of sync with reality;
- that is already the case to some degree, because the
  description did not take into account that the default
  heuristics varies between platforms (on Mac, it's just
  "off"), and that xlators can also prescribe direct I/O
  for the file of their choice (see change
  I3fe3312cd96baa4eecfe1247ab7255b4f455f049).

Change-Id: Ia83479c0c67fe66b7fc2e0e8db5b7792d9f44b28
Signed-off-by: Csaba Henk <csaba@redhat.com>
2018-03-22 04:27:11 +00:00
Poornima G
77271e9c1e gfproxyd: Let glusterd manage gfproxy daemon
Updates: #242
BUG: 1428063
Change-Id: Iaaf2edf99b2ecc75f6d30762c752a6d445c1c826
Signed-off-by: Poornima G <pgurusid@redhat.com>
2017-10-18 14:15:05 +00:00
Amar Tumballi
590ae48c65 glusterfsd: allow subdir mount
Changes:

1. Take subdir mount option in client (mount.gluster / glusterfsd)
2. Pass the subdir mount to server-handshake (from client-handshake)
3. Handle subdir-mount dir's lookup in server-first-lookup and handle
   all fops resolution accordingly with proper gfid of subdir
4. Change the auth/addr module to handle the multiple subdir entries
   in option, and valid parsing.

How to use the feature:

`# mount -t glusterfs $hostname:/$volname/$subdir /$mount_point`
Or
`# mount -t glusterfs $hostname:/$volname -osubdir_mount=$subdir /$mount_point`

Option can be set like:

`# gluster volume set <volname> auth.allow "/subdir1(192.168.1.*),/(192.168.10.*),/subdir2(192.168.8.*)"`

Updates #175

Change-Id: I7ea57f76ddbe6c3862cfe02e13f89e8a39719e11
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: https://review.gluster.org/17141
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2017-08-04 05:26:42 +00:00
Kaleb S KEITHLEY
138935bf8d core: assorted typos and spelling mistakes reported by Debian lintian
Also missing bang (!) in #!/bin/bash in shell scripts.

Change-Id: I567a4be8f0f31f6285550f243fe802895f6bc43b
BUG: 1336793
Reported-by: Patrick Matthäi <pmatthaei@debian.org>
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/14398
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
2016-05-18 02:21:42 -07:00
Poornima G
9e3a0791c0 fuse: Address the review comments in the backport
Backport @ http://review.gluster.org/#/c/13626/3

Fix a typo error, consolidate the selinux and capability
check in getxattr and setxattr.

Change-Id: I4303de3d4dd00853169b07577311e03cbb912ed7
BUG: 1316327
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/13653
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Vijay Bellur <vbellur@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2016-03-09 19:15:33 -08:00
hari gowtham
a02cb725c7 Remove selinux mount option from "man mount.glusterfs"
Gluster doesn't SELinux mount option, so it is removed.

Change-Id: I471ad98a24b5f5d64279c805b3243cb1168dd3d1
BUG: 1274626
Signed-off-by: hari gowtham <hgowtham@redhat.com>
Reviewed-on: http://review.gluster.org/12422
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-11-10 07:11:30 -08:00
Harshavardhana
7c36d9ec0d doc: Update manpages
Change-Id: Id14c7c3229ed266cd15915a2136e3290ce2c5ed2
BUG: 1031328
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7338
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-03-28 10:26:49 -07:00
Harshavardhana
0404be9ca1 mount.glusterfs: getopts support and cleanup
This patch is an attempt to provide some much needed
cleanup for future maintenance of `mount.glusterfs`

- Add checks for command failures
- Spliting large code into subsequent simpler functions
- Standardized variables
- use 'bash' instead of 'sh' - since string manipulation
  and variable handling is far superior
- Overall code cleanup and Copyright change to Red, Hat Inc.
- Add new style of mounting with a comma separated list
  ~~~
  $ mount -t glusterfs <IP1/HOSTNAME1>,<IP2/HOSTNAME2>,..<IPN/HOSTNAMEN>:/<VOLUME> <MNT>
  ~~~
- Update age old `manpage` with new options :-)

Change-Id: I294e4d078a067d67d9a67eb8dde5eb2634cc0e45
BUG: 1040348
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/5931
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@gmail.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-12-13 02:25:53 -08:00
Avra Sengupta
5f88d4c1b0 libgfapi: "tcp" is documented as the valid transport type instead of "socket".
Change-Id: I066e9be7755a535f385c102cdd1822adeda7f319
BUG: 860203
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4226
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-11-28 16:24:41 -08:00
Varun Shastry
2ff5e1c2a1 All: License message change
The license message is changed to
  Copyright (c) 2008-2012 Red Hat, Inc. <http://www.redhat.com>
  This file is part of GlusterFS.

  This file is licensed to you under your choice of the GNU Lesser
  General Public License, version 3 or any later version (LGPLv3 or
  later), or the GNU General Public License, version 2 (GPLv2), in all
  cases as published by the Free Software Foundation.

Change-Id: I07d2b63ed5fbbbd1884f1e74f2dd56013d15b0f4
BUG: 852318
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/3858
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-08-28 03:45:06 -07:00
Pranith Kumar K
0cf100b58c LICENSE: s/GNU Affero General Public/GNU General Public/
Change-Id: I3914467611e573cccee0d22df93920cf1b2eb79f
BUG: 3348
Reviewed-on: http://review.gluster.com/182
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
2011-08-06 06:33:52 -07:00
Amar Tumballi
62e1096fb0 removed reference to GF_LOG_NORMAL
instead used GF_LOG_INFO, which is more standard log level.

Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@gluster.com>

BUG: 2669 (RuntimeError: cannot recognize log level "normal")
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2669
2011-04-07 11:40:25 -07:00
Amar Tumballi
4a95f8f3b3 man pages updated
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 2444 (keep man pages upto date with new codebase.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2444
2011-02-22 09:34:51 -08:00
Amar Tumballi
2e43696eb9 migrate from port 69* to 24007
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 1870 (Change the port from 69* to some other ports.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1870
2010-10-08 06:05:03 -07:00
Pranith K
85c013f3ac Change GNU GPL to GNU AGPL
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 1388 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1388
2010-10-04 07:50:05 -07:00
shishir gowda
95bafb5ad4 Man page updates
Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 1529 (need man pages for 'gluster' and 'glusterd')
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1529
2010-09-07 07:45:58 -07:00
Amar Tumballi
faad9087d0 man pages updated
man 8 glusterfs
man 8 mount.glusterfs
man 8 glusterfs-volgen

Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 734 (keep only the working/usable code in build tree to focus more on development)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=734
2010-03-24 00:22:38 -07: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
Harshavardhana Ranganath
c786585448 Added new man page for mount.glusterfs
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
2009-07-06 12:37:05 -07:00