summaryrefslogtreecommitdiffstats
path: root/xlators
Commit message (Collapse)AuthorAgeFilesLines
* storage/posix: Option to set brick(of a volume)'s root dir's uid/gidKrishnan Parthasarathi2012-12-122-5/+45
| | | | | | | | Change-Id: I529d4cd949477a436a5b571b69da9f1c8b33ee8f BUG: 858469 Reviewed-on: https://code.engineering.redhat.com/gerrit/1863 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* fuse: make background queue length configurableAmar Tumballi2012-12-123-3/+54
| | | | | | | | | | | | | | | * also make 'congestion_threshold' an option * make 'congestion_threshold' as 75% of background queue length if not explicitely specified * in glusterfsd.c, moved all the fuse option dictionary setting code to separate function Change-Id: Ie1680eefaed9377720770a09222282321bd4132e Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 845214 Reviewed-on: https://code.engineering.redhat.com/gerrit/1860 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* cli: Added special key "group" for bulk volume set.Krishnan Parthasarathi2012-12-121-29/+37
| | | | | | | | | | | | | | | | | | gluster volume set VOLNAME group group_name - where group_name is a file under /var/lib/glusterd/groups containing one key, value pair per line as below, key1=value1 key2=value2 [...] - the command sets key1 to value1 and so on. Change-Id: Ic4c8dedb98d013b29a74e57f8ee7c1d3573137d2 BUG: 851237 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1859 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: post-op-delay supportAnand Avati2012-12-126-1/+173
| | | | | | | | | | | | | | | post-op-delay introduces an artificial delay between the OP and POST-OP-CHANGELOG phases of a write transaction to increase the probability of changelog-piggyback and eager-locking to work more efficiently. Change-Id: I865ca4b68512c44818719c7e388952f15d53e6c2 BUG: 836033 Signed-off-by: Anand Avati <avati@redhat.com> Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1858 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: cleanup lk_owner and PID messAnand Avati2012-12-123-41/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically PID (frame->root->pid) was used by the locks translator to identify a locker (and make decisions about which locks contend or cooperate/merge). Since the introduction of lock_owner parameter the usage of PID (for locks) was deprecated and is now unused. This patch nukes the usage of PID in AFR The usage of lk_owner has also ended up being a mess, because of the differentiation required between ->lk() and ->inodelk(), (->lk() needs to be identified by the process (roughly) and ->inodelk() needs to be identified by the transaction) and also because of optimizations like eager locking (locks are no more identified by the transaction as they now get inherited by the next transaction). The scheme (and technique) now is: - All FOPs (the third phase of the transaction) happen with the lk_owner which is set by the topmost layer (FUSE, NFS etc.) - All entrylks are issued with lk_owner set to the frame->root address. - Inodelks which will not be subject to eager locking are issued with lk_owner set to frame->root. - Inodelks which are subject to eager locking are issued with lk_owner set to the address of fd_t (which are the only type of frames which get subject to the eager locking optimization) - At the start of the transaction, the transaction frame's lk_owner is set to the either frame->root or fd_t (and never unmodified) depending on the type of transaction. - Just before the third phase (FOP phase) the set lk_owner is "saved" away and overwritten by the lk_owner submitted by the top layer (FUSE or NFS) - Right after the third phase, the saved lk_owner is "restored" to resume the transaction into the POST-OP and eventually UNLOCK using the same lk_owner which was used during the LOCK phase. Change-Id: I6ab8e4d6b65ae4185fa85ad3fded8e9188b2f929 BUG: 836033 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1857 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Persisted hooks friendly user.* keysKrishnan Parthasarathi2012-12-123-33/+45
| | | | | | | | | | | | | | | - Fixed validation of user.* keys in presence of multiple key, value pairs in a single volume set command Change-Id: I5b96de2d009fbc79772121308d9b4c0a552bac52 BUG: 825902 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.com/3715 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1855 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* glusterd-hooks: added support for separate namespace for 'volume set' keysKrishnan Parthasarathi2012-12-122-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | [cherry-picked Amar's patch from master] The keys in the above mentioned namespace could be used by hook scripts to peform tasks on 'special' keys as defined by the storage admin. The choice of the key and its semantics of it are outside the scope of glusterd. It is the responsibility of the storage admin to keep the meaning of the key(s) consistent. If a user gives a command like 'gluster volume set <VOLNAME> user.for-this-key do-this" scripts would get 'user.for-this-key=do-this' as argument. Change-Id: I5509e17d99e4ddd8bf5df968dcd51ff9a80dc3ab Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 825902 Reviewed-on: http://review.gluster.com/3443 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1854 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* libglusterfs,mount/fuse: implement gidcache mechanism in fuse-bridgeBrian Foster2012-12-125-1/+63
| | | | | | | | | | | | | | | | | | | | | | | | | This change genericizes the cache mechanism implemented in commit 8efd2845 into libglusterfs/src/gidcache.[ch] and adds fuse-bridge as a client. The cache mechanism is fundamentally equivalent, with some minor changes: - Change cache key from uid_t to uint64_t. - Modify the cache add logic to locate and use an entry with a matching ID, should it already exist. This addresses a bug in the existing mechanism where an expired entry supercedes a newly added entry in lookup, causing repeated adds and flushing of a cache bucket. The fuse group cache is disabled by default. It can be enabled via the 'gid-timeout' fuse-bridge translator option and accompanying mount option (i.e., '-o gid-timeout=1' for a 1s entry timeout). BUG: 800892 Change-Id: I0b34a2263ca48dbb154790a4a44fc70b733e9114 Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1853 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* cli: Proper xml output for "gluster peer status"Kaushal M2012-12-121-0/+5
| | | | | | | | | | | Change-Id: I90952ba2ea606552cf4ad67dd296a440f90592d6 BUG: 847760 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/3870 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1852 Tested-by: Vijay Bellur <vbellur@redhat.com>
* Self-heald: Fix inode leakPranith Kumar K2012-12-121-12/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | RCA: There is an inode-leak because inode_link returns linked inode by taking a reference. That needs to be unreffed. Fix: Added the code to perform unrefs. In addition to that updated the loc inode with the linked-inode because that is the best practice. The code to update the input inode's gfid can be removed later, its already removed in master. Tests: Checked that opendir comes with an loc with valid inode Checked that re-opendir happens successfully. Tested index, full self-heal work fine with the fix. BUG: 826580 Change-Id: I0c68192ff98f76152ed112b393d497b8fee93355 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/3518 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1851 Tested-by: Vijay Bellur <vbellur@redhat.com>
* dht/rebalance: set the correct ownership on the dst file.shishir gowda2012-12-121-0/+8
| | | | | | | | | | | | | | | | | Currently, the dst file created has root:root ownership, till migration is completed. During this phase, open fails on the dst file if uid/gid is non-root. Setting the dst_file to the correct ownership fixes the issue Change-Id: Icfec89eb10dc866cdee38dab17695fe21174ef99 BUG: 852361 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.org/3862 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1850 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* storage/posix: implement native linux AIO supportshishir gowda2012-12-126-6/+89
| | | | | | | | | | | | | | | Configurable via cli with "storage.linux-aio" settable option Backported Avati's patch http://review.gluster.org/#change,3627 BUG: 837495 Change-Id: Ia7c26f5734d34d341debd422a5c59bba31eef844 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.org/3849 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1849 Tested-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: handle percent option for 'min-free-disk'Amar Tumballi2012-12-051-0/+10
| | | | | | | | | | | | | | | | | * with the init option cleanups, setting of 'conf->disk_unit' was reset, which made it not set the '%' in the option. * bring a global check, which makes the option assume its percent, as long as value is < 100. Upstream Patch : http://review.gluster.org/3918 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 858488 Change-Id: I7916d69ba72f0647881062d910bae73884a1b1c7 Reviewed-on: https://code.engineering.redhat.com/gerrit/144 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* mount/fuse: readdir() should return 32-bit inodes when 'enable-ino32' is usedNiels de Vos2012-11-193-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From upstream commit 9cc24de746ce0e616fa09120b89aaa9a626f33cb: > The glusterfs mount option 'enable-ino32' does not change the behaviour > of readdir(). fuse_readdir_cbk() uses entry->d_ino directly, and this > was missed in commit c13823bd16b26bc471d3efb15f63b76fbfdf0309. > > By adding the function gf_fuse_fill_dirent(), the fuse_dirent structure > is filled in a similar way as the fuse_attr structure. This helper uses > the same function to squash the 64-bit inode in a 32-bit attribute. > > Change-Id: Ia20e7144613124a58691e7935cb793b6256aef79 > BUG: 850352 > URL: http://lists.nongnu.org/archive/html/gluster-devel/2012-09/msg00051.html > Tested-by: Steve Bakke <sbakke@netzyn.com> > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/3955 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Brian Foster <bfoster@redhat.com> > Reviewed-by: Anand Avati <avati@redhat.com> > Signed-off-by: Niels de Vos <ndevos@redhat.com> BUG: 876679 Change-Id: I0d6514fa6d118805b66cb942d94f40bb09045326 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1586 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* mount/fuse: add mount-option "enable-ino32" for the native clientNiels de Vos2012-11-194-30/+49
| | | | | | | | | | | | | | | | | | | | | | | | From upstream commit c13823bd16b26bc471d3efb15f63b76fbfdf0309: > By default the GlusterFS-native client uses 64-bit inodes. Some 32-bit > applications can not handle these correctly. Introduce a client-side > mount option "enable-ino32" which causes the FUSE-client to squash the > 64-bit inodes into a 32-bit value. > > Change-Id: I3296d16528bfb50457b9675f6b8701234ed82ff0 > BUG: 850352 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/3885 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Anand Avati <avati@redhat.com> > Signed-off-by: Niels de Vos <ndevos@redhat.com> BUG: 876679 Change-Id: Ie52ebc7d08f69a11cfa892a057bc9faf71446dcc Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1585 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* protocol/server: check bound_xl for NULL before dumping ltableRaghavendra Bhat2012-11-192-2/+9
| | | | | | | | | | | | | * If bound_xl in the setvolume is NULL, then put the connection back otherwise it might result in segfault when bound_xl from that connection object is accessed. Change-Id: I2805e8b45e5767121f323b0f6fed4084dfc020c0 BUG: 874913 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1544 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* NFS is picking up geo-rep's already open (read-only) file descriptorKaleb S. KEITHLEY2012-11-141-1/+1
| | | | | | | | | | | | Add anonymous member to fd_t and use it instead of over-loading pid for geo-rep and self heal Change-Id: I53a3becb6ee72498bab889654547ca7422bc0a59 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> BUG: 874272 Reviewed-on: https://code.engineering.redhat.com/gerrit/1531 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* mgmt/glusterd: Remove inner function to prevent execstack markingPranith Kumar K2012-11-081-16/+32
| | | | | | | | | Change-Id: I1f318fb4388ee3499e3bfab5c8f8f6c837a7d934 BUG: 840122 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1512 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* mgmt/glusterd: Use correct api for percent conversionPranith Kumar K2012-11-071-2/+3
| | | | | | | | | | Change-Id: I66968366b6533562dd5f9bf14c26a58316487d0a BUG: 862033 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/45 Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* mgmt/glusterd: Trigger quorum action on peer deletionPranith Kumar K2012-11-071-0/+5
| | | | | | | | | | Change-Id: I8f44a921d7df3e7409e5cc5ffd206c7fc2baca17 BUG: 862017 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/46 Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* nfs: resolve parent inode during inode_loc_fillRajesh Amaravathi2012-11-071-0/+2
| | | | | | | | | | | | | This commit resolves the parent inode in nfs_inode_loc_fill if the inode has a resolved path. Change-Id: I2159df3406c632477719bad9574180a002514301 BUG: 872923 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1484 Reviewed-by: Jeffrey Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* geo-rep / gsyncd,glusterd: do not hardcode socket pathCsaba Henk2012-10-316-5/+16
| | | | | | | | | | | | ... in gsyncd python code. Indeed, use the configuration mechanism to set it suitably from glusterd. Change-Id: I9fe2088b14d28588d1e64fe892740cc5755b8365 BUG: 868877 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/173 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* geo-rep / gsyncd: fixes to communication with child processesCsaba Henk2012-10-311-7/+11
| | | | | | | | | | | | due to not using the proper Python keyword, errhandler thread was possible to run into empty select Signed-off-by: Csaba Henk <csaba@redhat.com> BUG: 870502 Change-Id: I3c39e718e72545c27d50fd73aa6daf54062331b0 Reviewed-on: https://code.engineering.redhat.com/gerrit/167 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* geo-rep / gsyncd: sanitize error log of external commandsCsaba Henk2012-10-311-2/+10
| | | | | | | | | | | | | | If a command invoked by gsyncd fails, gsyncd makes a log of what comes out on its stderr. So far the log indeterministically broke lines at random places. Now put some effort into reconstructing original lines and having a faithful log. BUG: 870502 Change-Id: I16fcc75d3e0f624c10c71d9b37c937ca677087cc Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/166 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* geo-rep / gsyncd: further cleanup refinementsCsaba Henk2012-10-314-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Regarding issue of leftover ssh control dirs: If master side worker is stuck in connection establishment phase, have the monitor kill it softly (ie. first by SIGTERM, to let it cleanup). This is trickier than sounds on first hearing, because if worker is stuck in waiting for a RePCe answer (in threading.Condition().wait()), then SIGTERM is ignored (more precisely, Python holds it back for the wait and resends it to itself when wait is over). So instead of signalling the worker only, we send TERM to the whole process group -- that brings down the ssh connection, which wakes up the waiting worker, which then can cleanup. Only problem is that monitor is also in the process group and it should not coomit a suicide. That is taken care by setting up a one-time SIGTERM handler in the monitor. - Regarding slave gsyncd stuck in chdir: Slave gsyncd is usually well behaved: if master does not send keepalives, it takes care to exit. However, if a hang occurs in early phase, when slave is to change to the gluster mountpoint, no timeout is set up for that (and unlike on master side, neither is there an external actor like the monitor to do that). So, to manage this scenario, we do the chdir in a (supposedly) short lived thread, and in the main thread we wait for the termination of this thread. If that does not happen within the time limit, main thread calls for cleanup and exit. (This logic explicitely takes the appropriate action in the cases when chdir succeeds or when hangs; but what about the remaining case, when chdir fails? Well in that case the chdir thread's exception handler will put the process to cleanup and exit route.) Change-Id: I6ad6faa9c7b1c37084d171d1e1a756abaff9eba8 BUG: 870503 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/165 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* nfs: do lookup on getattr after brick-status changeKrishna Srinivas2012-10-198-40/+171
| | | | | | | | | | | | | | (ported from Jeff Darcy's upstream commit) By doing a lookup, we get a chance to do all of the self-heal checks that would occur if we were using native protocol, and return proper status if the self-heal fails. Best of all, we don't need to misrepresent times. BUG: 830134 Change-Id: I9f4f0ab58373c0a8d7a880cc96a29ece2cc4f668 Signed-off-by: Krishna Srinivas <ksriniva@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/125 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* core/statedump: dump the information in a temporary file andRaghavendra Bhat2012-10-191-1/+1
| | | | | | | | | | | then rename Change-Id: Id35fd5b3801f46db75660a26d1f3011883c293a7 BUG: 852041 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/120 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* geo-rep/gsyncd: work around rsync argument overflowCsaba Henk2012-10-101-3/+8
| | | | | | | | | | | | instead of passing the files to be synced as args to rsync, have rsync read them on stdin with '-0 --files-from=-' Change-Id: Ic3f71a0269941ce50051af8adfad183a52a79b01 BUG: 859173 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/62 Tested-by: Venky Shankar <vshankar@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* mgmt/glusterd: Inject events only on first disconnectPranith Kumar K2012-10-011-25/+33
| | | | | | | | | Change-Id: I31a46186c7d519057992c6111528acc666babb28 BUG: 861596 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/43 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* mgmt/glusterd: start-brick if volume not in server-quorumPranith Kumar K2012-10-011-1/+1
| | | | | | | | | Change-Id: I94a38c436bd149301f8375471fa36b52dccdd6e6 BUG: 861596 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/41 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* Merge "mgmt/glusterd: Avoid rounding off error in quorum calculation"Vijay Bellur2012-10-011-2/+7
|\
| * mgmt/glusterd: Avoid rounding off error in quorum calculationPranith Kumar K2012-09-281-2/+7
| | | | | | | | | | | | Change-Id: I399bae87dc0731ee9a828306c5c411f269fb6760 BUG: 861327 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* | mgmt/glusterd: Don't show opt-version count in volume infoPranith Kumar K2012-09-281-0/+2
| | | | | | | | | | | | Change-Id: Ia889753c59dde4cdaf4486781fde883b5d153e76 BUG: 861289 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* | mgmt/glusterd: volume set help should not be affected by quorumPranith Kumar K2012-09-281-1/+28
|/ | | | | | Change-Id: I47e96be696891f802e9e52dd8e177573e666fd68 BUG: 861289 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* mgmt/glusterd: Implementation of server-side quorum.Pranith Kumar K2012-09-2715-175/+1182
| | | | | | | | | Feature-page: http://www.gluster.org/community/documentation/index.php/Features/Server-quorum Change-Id: Ifec0f1a697d390a29ba447a09750602fea1b3a4b BUG: 840122 Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
* glusterd: Expect setmntent(3) to return NULLKrishnan Parthasarathi2012-09-091-2/+9
| | | | | | | | - Closed the mtab FILE * using endmntent(3) Change-Id: I5e1ebb7f092abda638cfbb5524da693dcac6c872 BUG: 851109 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
* cluster/distribute: remove gf_log() from statedump functionsAmar Tumballi2012-09-071-3/+0
| | | | | | Change-Id: I83cccab6819d6a74e96c2717ca539fa1568cac89 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 843822
* core/statedump: statedump enahancementsRaghavendra Bhat2012-09-072-19/+87
| | | | | | | | | | | | | * append timestamp to the statedump filename to prevent old files getting over written * Add start and end markers to statedump to indicate beginning and finishing of statedump information * Make glusterfs take options through /tmp/glusterdump.options file and treating those options with higher prioriry * do not dump the entire inode table in the statedump. Instead just dump the ltable and the fdtable Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* glusterd: Fixed incorrect assumptions in rpcsvc actors of glusterdKrishnan Parthasarathi2012-09-042-19/+27
| | | | | | | | | | | | | | | | | | Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3864 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Conflicts: xlators/mgmt/glusterd/src/glusterd-handler.c Change-Id: Iabfcb401de9d658e32433aa1e8c87b329cbd2cf7 BUG: 851109 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3876 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* afr: Avoid excessive logging in self-heal.Krishnan Parthasarathi2012-08-176-20/+26
| | | | | | | | | | | | | | | - (Excessive) Logging has been very useful as 'bread-crumbs' in many a root-cause analyses. This patch aims at avoiding logging when the information could be reconstructed using the xattrs, statedump, and/or "volume heal" CLI commands. Change-Id: I8f646cbee44e98495ea6963f9dfcae95375c8900 BUG: 844804 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.com/3827 Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* rpc: Reduce frame-timeout for glusterd connectionsKaushal M2012-08-173-8/+46
| | | | | | | | | | | | | | | | Reduce frame-timeout for glusterd connections from 30mins to 10 mins. 30mins is too long when compared to cli timeout of 2mins. Changing to 10mins reduces the disparity between cli and glusterd. Also, fix glusterfs_submit_reply() so that a reply is sent even if serialize failed. BUG: 843003 Change-Id: Ie8d5ec16fbbb54318a5935a47065e66fd3338b87 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3812 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: Handle child_up & fd not opened case in xactionPranith Kumar K2012-08-171-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RCA: When an fd is opened while a brick is down, after the brick comes back up afr issues open on the other brick. It can fail for a number of reasons (enoent etc). While the system is in that state, inode/entrylks pre-op happen only on the brick that is up and fd is opened for fd-fops. post-op should consider only the bricks where both pre-op and fop succeeded as success, rest of them as failures. Code now marks only the children that are down as failures as opposed to child_down & fd-not-opened. This makes change-log appear as success on the subvolume where we did not do any fop leading to no change-log but differences in data/metadata for reg-files. Fix: Mark non-participants of fop as failure. This is tracked in transaction.pre_op[]. Tests: Simulated the scenario using err-gen on top of one of the client xlator which fails all fops always. Performed fops and the changelog represented pending fops on the brick with err-gen loaded. Tested the case of brick down and perform entry/metadata/data operations to confirm they still work as expected. Change-Id: I41905936126b19abba56ca581c0301a894507e1a BUG: 844987 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3776 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* performance/io-cache: use pthread_mutex_trylock to hold mutex in statedumpsRaghavendra Bhat2012-08-171-18/+81
| | | | | | | | | | | | Do not use pthread_mutex_lock and gf_log functions while dumping information to statedump, to avoid deadlocks. Change-Id: I6569366856fc2bc0fefb49c8379e2e4337717ce4 BUG: 843787 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3799 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* performance/write-behind: use pthread_mutex_trylock to hold mutex in statedumpsRaghavendra Bhat2012-08-171-3/+15
| | | | | | | | | Change-Id: I24c83b1b5e83ef3e38a019043c7fbca13b19ff43 BUG: 841543 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3815 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: Optimize readdirp calls in DHTshishir gowda2012-08-175-3/+68
| | | | | | | | | | | | | | | | | Bring in option which is supported by posix xlator to filter out directory's entries from being returned. DHT would now request non-first subvols to filter out directory entries. dht xlator-option readdir-optimize will enable this optimization Change-Id: Ibf99f1bef501f285ff44a1cecfbebee9e16063b6 BUG: 838199 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.com/3806 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: Avoid setting split-brain outside inode locksPranith Kumar K2012-08-135-34/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | RCA: The bug is observed because the decision to mark a file in split-brain is taken outside appropriate locks. Lookup gathers xattrs outside any lock. The xattrs being in split-brain in lookup should only be taken as a hint. Appropriate inodelks should be taken before confirming a split-brain. Self-heal confirms this at the moment. Fix: Self-heals are launched to inspect xattrs when the data/metadata self-heal options are turned on. Decision to set/reset split-brain flag is taken inside appropriate locks. Known Issue After fix: If data/metadata self-heal is turned off, inspecting of xattrs could not be performed so split-brain behavior does not work correctly if the self-heal options are turned off. This bug is handled only in upstream. Change-Id: I59a43d5ce7bf9ca35bff54a51bf4cfa55d717a9e BUG: 833727 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3691 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/locks: Fix statedump codePranith Kumar K2012-08-134-74/+52
| | | | | | | | | | | | | | | | | | | | | | | | RCA: Taking blocking mutex/spin locks lead to dead locks because of the locking order in statedumps. Also we were asked to remove gf_logs if possible to avoid extra cost in signal handlers. Fix: changed blocking mutes/spin locks to their non-blocking variants. Removed gf_logs in locks xlator statedump code-path. Tests: State-dump success cases are working fine. Triggered try-lock failures by putting statedumps in a while loop. In parallel did chown of the same file in a while loop. BUG: 843781 Change-Id: Iac9b75d79cd5e036cd3eafc1e106074e2c6b5c47 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3752 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* performance/io-threads: Provide option to turn off least-priorityPranith Kumar K2012-08-133-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | RCA: In cases when self-heal is in progress, self-heal fops are starved because of least-priority. This affects other fops with conflicting inode, entry locks with self-heal. Fix: This patch provides configuring enable/disable of least-priority. Additional changes: Moved RCHECKSUM fop to low instead of least because it will still affect the performance of other fops if RCHECKSUM is in LEAST priority. Tests: Tested that the enabling/disabling of fops is working fine. Tested that RCHECKSUM fop priority is assigned LOW when least-priority is disabled. BUG: 843704 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Change-Id: I892f99d6d0a3e0ae6c0a280f82e2203af0c346f6 Reviewed-on: http://review.gluster.com/3751 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* performance/read-ahead: use pthread_mutex_trylock to hold mutex in statedumpsRaghavendra Bhat2012-08-131-11/+18
| | | | | | | | | Change-Id: I4de64915a9c6a46e126ef4a5b987e49de558f827 BUG: 843796 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3801 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* performance/quick-read: use pthread_mutex_trylock to hold mutex in statedumpsRaghavendra Bhat2012-08-131-3/+17
| | | | | | | | | | | | Do not use pthread_mutex_lock and gf_log functions while dumping information to statedump, to avoid deadlocks. Change-Id: Ic77d96bc52f2a2a32629c0ae20bba797317e0a81 BUG: 843789 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3800 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>