summaryrefslogtreecommitdiffstats
path: root/xlators
Commit message (Collapse)AuthorAgeFilesLines
* glusterd: pass the right argument for perf subgraphKrishnan Parthasarathi2014-04-211-1/+1
| | | | | | | | Change-Id: Ic292dcd8e477066c1079f0f1e170f5153459b029 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/7514 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* fuse: prevent READDIR(P) from writing to much data to /dev/fuseNiels de Vos2014-04-211-14/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In an environment with mixed architectures (32-bit servers, 64-bit client), it is possible that the on-wire Reply on a READDIR(P) procedure contains more direntries than the client can fit in the maximum size that the fuse-request indicated. A direntry is a dynamically sized structure, because the structure contains the name of the entry. The client sends a maximum size in the READDIR(P) Call to the server, and the server uses this size to limit the number of direntries to return. In case the server can pack more direntries in the requested maximum size (due to alignment differences between the architectures), it can happen that the client unpacks the list of direntries into a buffer that exceeds the maximum size that was given in the initial fuse-request. This change introduces a check for the maximum requested size of the fuse-response in fuse_readdir_cbk() and fuse_readdirp_cbk(). When the conversion from gluster-direntries to the fuse-direntry format takes place, the maximum size is checked, and the 'extra' direntries are discarded. The next readdir()/getdents() that is done, will fetch the just discarded direntries again. In addition to this bugfix, some extra logging in send_fuse_iov() and send_fuse_data() has been added to help diagnosing similar issues. Change-Id: If2eecfcdf9c248f3820035601446d2c89ff9d1a1 BUG: 1074023 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/7278 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-by: Anand Avati <avati@redhat.com>
* fuse: allow xlators to request for direct-io-mode on virtual filesAnand Avati2014-04-201-2/+14
| | | | | | | | | | | | | | | | | | | Translators like meta, create virtual files with dynamic content generated only at the time of open(). Therefore the file size returned in lookup or stat is 0 (just like files in /proc). However the VFS does not read beyond the size, and if the size is 0, no READ ever reaches gluster for that file -- unless direct-io-mode is enabled. This patch allows translators to return "direct-io-mode" flag for such 0-byte virtual files in xdata of open_cbk/create_cbk. Change-Id: I3fe3312cd96baa4eecfe1247ab7255b4f455f049 BUG: 1089216 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/7506 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* fuse-resolve: loc_wipe() after inode_link()Anand Avati2014-04-201-2/+2
| | | | | | | | | | | | the inode to be linked may have the last ref. loc_wipe() can destroy it before inode_link() gets to ref it. Change-Id: Ic2d44084e6e9c8289f35cae82c8e4575af105398 BUG: 1089216 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/7505 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* cluster/dht: force set dir inode ctx cached time in setattr()Anand Avati2014-04-173-1/+34
| | | | | | | | | | | | | | | | | In setattr, the inode times may have been explicitly set "back in time". In such cases, if the inode ctx times are not force set, then they continue to be higher and continue serving the higher/older value in future calls to dht_inode_ctx_time_update() Change-Id: I9cbfa7cf7c4069b0106d1f462de08c5d59bc91b5 BUG: 1083324 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/7378 Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* mount.glusterfs: return 32 in case of double mountingNiels de Vos2014-04-171-3/+3
| | | | | | | | | | | | | The mount.nfs helper returns 32 for this particular error case. It makes sense for mount.glusterfs to return the same error value. Change-Id: I628f4c93bc796bb096e91857195ffd3d296eaae9 BUG: 1031973 Reported-by: Deepak C Shetty <deepakcs@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/7469 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* dict: add dict_set_dynstr_with_allocKrishnan Parthasarathi2014-04-141-24/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There is an overwhelming no. of instances of the following pattern in glusterd module. ... char *dynstr = gf_strdup (str); if (!dynstr) goto err; ret = dict_set_dynstr (dict, key, dynstr); if (ret) goto err; ... With this changes it would look as below, ret = dict_set_dynstr_with_alloc (dict, key, str); if (ret) goto err; Change-Id: I6a47b1cbab4834badadc48c56d0b5c8c06c6dd4d Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/7379 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* logging: Make logger and log format configurable through cliKrutika Dhananjay2014-04-113-6/+170
| | | | | | | | | | Change-Id: Ic4b701a6621578848ff67ae4ecb5a10b5f32f93b BUG: 1075611 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/7372 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* mount.glusterfs: return an error when mounting failedNiels de Vos2014-04-111-21/+26
| | | | | | | | | | | | | | | | | | When mounting fails, mount.glusterfs incorrectly returns 0 for some error cases, it should return 1 instead. Also make sure that error messages are redirected to /dev/stderr and not printed to stdout. Unfortunately it is not possible with the current test-scripts to test commands like 'mount -t glusterfs ...'. Any mounting of Gluster volumes is done directly with the 'glusterfs' command instead. Change-Id: Ica9d45b6d5ae537de869a1fa0f6c3edab47225d1 BUG: 1031973 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/7441 Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli,glusterd: Improve detach check validationKaushal M2014-04-114-25/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch improves the validation for the 'peer detach' command. A check for if volumes exist with some bricks on the peer being detached validation is added in peer detach code flow (even force would have this validation). This patch also gurantees that peer detach doesn't fail for a volume with all its brick on the peer which is getting detached and there are no other bricks on this peer. The following steps need to be followed for removing a downed and unrecoverable peer. * If a replacement system is available - add it to the cluster - use replace-brick to migrate bricks of the downed peer to the new peer (since data cannot be recovered anyway use the 'replace-brick commit force' command) or, If no replacement system is available, - remove bricks of the downed peer using 'remove-brick' Change-Id: Ie85ac5b66e87bec365fdedd8352b645bb25e1c33 BUG: 983590 Signed-off-by: Kaushal M <kaushal@redhat.com> Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/5325 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gluster: GlusterFS Volume Snapshot FeatureAvra Sengupta2014-04-1128-631/+12546
| | | | | | | | | | | | | | | | | | | | | | | | | This is the initial patch for the Snapshot feature. Current patch includes following features: * Snapshot create * Snapshot delete * Snapshot restore * Snapshot list * Snapshot info * Snapshot status * Snapshot config Change-Id: I2f46920c0d61c515f6a60e0f8b46fff886d9f6a9 BUG: 1061685 Signed-off-by: shishir gowda <sgowda@redhat.com> Signed-off-by: Sachin Pandit <spandit@redhat.com> Signed-off-by: Vijaikumar M <vmallika@redhat.com> Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Signed-off-by: Joseph Fernandes <josferna@redhat.com> Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/7128 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: Set right argument order for STACK_WIND_COOKIEVijay Bellur2014-04-101-1/+1
| | | | | | | | | | Change-Id: Ia26e17a7147ed825319c7c29880b9cf4ae80a48c BUG: 1085259 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/7416 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: call runner_end even if runner_start failsJeff Darcy2014-04-091-0/+11
| | | | | | | | | | | Change-Id: I5eca01a131307ba3be2aed4922eea73025ff284c BUG: 1081013 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/7360 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: Mem leak fixes found in valgrind for iozonePranith Kumar K2014-04-091-0/+4
| | | | | | | | | | Change-Id: I869d191dc3470b2208c17343bbf772f01ef744cb BUG: 1085511 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/7424 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/locks: Fix a missing assignment in new_entrylk_lock()Vijay Bellur2014-04-081-0/+1
| | | | | | | | | | Change-Id: If5c03456d61ec930d588b57781fb545eed18e4a2 BUG: 1085220 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/7413 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
* cluster/afr: Init local on txn-frame for zerofillPranith Kumar K2014-04-081-1/+1
| | | | | | | | | | Change-Id: I516f4fb0237dd0b3e512117bf987cea69f8678b8 BUG: 1084485 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/7407 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc: warn and truncate grouplist if RPC/AUTH can not hold everythingNiels de Vos2014-04-081-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GlusterFS protocol currently uses AUTH_GLUSTERFS_V2 in the RPC/AUTH header. This header contains the uid, gid and auxiliary groups of the user/process that accesses the Gluster Volume. The AUTH_GLUSTERFS_V2 structure allows up to 65535 auxiliary groups to be passed on. Unfortunately, the RPC/AUTH header is limited to 400 bytes by the RPC specification: http://tools.ietf.org/html/rfc5531#section-8.2 In order to not cause complete failures on the client-side when trying to encode a AUTH_GLUSTERFS_V2 that would result in more than 400 bytes, we can calculate the expected size of the other elements: 1 | pid 1 | uid 1 | gid 1 | groups_len XX | groups_val (GF_MAX_AUX_GROUPS=65535) 1 | lk_owner_len YY | lk_owner_val (GF_MAX_LOCK_OWNER_LEN=1024) ----+------------------------------------------- 5 | total xdr-units one XDR-unit is defined as BYTES_PER_XDR_UNIT = 4 bytes MAX_AUTH_BYTES = 400 is the maximum, this is 100 xdr-units. XX + YY can be 95 to fill the 100 xdr-units. Note that the on-wire protocol has tighter requirements than the internal structures. It is possible for xlators to use more groups and a bigger lk_owner than that can be sent by a GlusterFS-client. This change prevents overflows when allocating the RPC/AUTH header. Two new macros are introduced to calculate the number of groups that fit in the RPC/AUTH header, when taking the size of the lk_owner in account. In case the list of groups exceeds the maximum possible, only the first groups are passed over the RPC/GlusterFS protocol to the bricks. A warning is added to the logs, so that most system administrators will get informed. The reducing of the number of groups is not a new inventions. The RPC/AUTH header (AUTH_SYS or AUTH_UNIX) that NFS uses has a limit of 16 groups. Most, if not all, NFS-clients will reduce any bigger number of groups to 16. (nfs.server-aux-gids can be used to workaround the limit of 16 groups, but the Gluster NFS-server will be limited to a maximum of 93 groups, or fewer in case the lk_owner structure contains more items.) Change-Id: I8410e59d0fd246d601b54b961d3ae9cb5a858c10 BUG: 1053579 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/7202 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* feature/barrier: Add statedump supportKaushal M2014-04-071-1/+81
| | | | | | | | | | | | This patch adds statedump support for barrier. This currently dumps barrier xlators private information and the queue of barriered fops. Change-Id: I273eb6e676db02c40c363feeff58a79737dc041e BUG: 1060002 Reviewed-on: http://review.gluster.org/7136 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/barrier: add barrier translatorVarun Shastry2014-04-076-1/+651
| | | | | | | | | | | | | | gluster feature page: http://www.gluster.org/community/documentation/index.php/Features/Server-side_Barrier_feature Change-Id: Ia9f8802a54d1ffbd1cf789b80f5d30819bf65f64 BUG: 1060002 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/6928 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* afr: Simple 1-liner fix for crash in RackspaceBrian Foster2014-04-041-1/+1
| | | | | | | | BUG: 1084485 Change-Id: I89ddf10add041638ef70baebbce0ec2807ef4b6d Signed-off-by: Justin Clift <justin@gluster.org> Reviewed-on: http://review.gluster.org/7402 Reviewed-by: Anand Avati <avati@redhat.com>
* features/glupy: Add mem accounting supportPrashanth Pai2014-04-031-0/+19
| | | | | | | | | | | | | | | | When glusterfs is built from source using -DDEBUG flag and glupy xlator is added to vol file, the brick process used to crash when mounting the volume. This fix is largely derived from the fix submitted for BZ #1035751. Thanks to Justin Clift for helping in tracking this down. BUG: 1035751 Change-Id: Id64f92eecc9335e34dd08812fe176774e7723c2c Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/7332 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* features/gfid-access: Fix possible inode memory corruption.Kotresh H R2014-04-031-10/+22
| | | | | | | | | | | | | | | | | During lookup, the inode is not ref'd. Added code to ref the inode in call path and unref in cbk path. Also fixed a case where we should always be putting linked inode into context as it is not guaranteed that we get same inode that we passed in a call to inode_link. Change-Id: Iaec083a9258658bef3047e83956729d3dbcd9a59 BUG: 1080295 Signed-off-by: Kotresh H R <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/7329 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* cluster/afr: Remove eager-lock stub on finodelk failurePranith Kumar K2014-04-023-6/+23
| | | | | | | | | | | | | | | | | | | | Problem: For write fops afr's transaction eager-lock init adds transactions that can share eager-lock to fdctx list. But if eager-lock finodelk fop fails the stub remains in the list. This could later lead to corruption of the list and lead to infinite loop on the list leading to a mount hang. Fix: Remove the stub when finodelk fails. Change-Id: I0ed4bc6b62f26c5e891c1181a6871ee6e4f4f5fd BUG: 1063190 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/6944 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* DHT/Rebalance : Hard link Migration FailureSusant Palai2014-03-301-6/+56
| | | | | | | | | | | | | | | | | | | Probelm : __is_file_migratable used to return ENOTSUP for all the cases. Hence, it will add to the failure count. And the remove-brick status will show failure for all the files. Solution : Added 'ret = -2' to gf_defrag_handle_hardlink to be deemed as success. Otherwise dht_migrate_file will try to migrate each of the hard link, which not intended. Change-Id: Iff74f6634fb64e4b91fc5d016e87ff1290b7a0d6 BUG: 1066798 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/7124 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: suppress spurious error message during startupRavishankar N2014-03-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | From glusterd log: ---------- E [glusterd-store.c:1981:glusterd_store_retrieve_volume] 0-: Unknown key: brick-0 ---------- The message is emitted from glusterd_store_retrieve_volume() when it reads the volinfo file because it doesn't do anything with the key-value pair. Suppress the error. The key is needed by glusterd_store_retrieve_bricks() which anyway re-reads it. Also change the log level to WARNING since we do not error out if an unknown key is got while parsing the volinfo file. Change-Id: Icd7962d9e16e0f90e6a37ee053dcafe97d2cab94 BUG: 1079279 Reviewed-on: http://review.gluster.org/7314 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: Sparse file self-heal cangesPranith Kumar K2014-03-261-9/+28
| | | | | | | | | | | | | - Fix boundary condition for offset - Honour data-self-heal-algorithm option - Added tests for sparse file self-healing Change-Id: I14bb1c9d04118a3df4072f962fc8f2f197391d95 BUG: 1080707 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/7339 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/compress: Add mem accounting support for compressPranith Kumar K2014-03-242-0/+20
| | | | | | | | | | Change-Id: I89a7a4cd64ef65ad3bab180d66797a62b4e1e195 BUG: 923540 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/7320 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/glupy: Rename Glupy python module to avoid namespace conflictJustin Clift2014-03-249-17/+48
| | | | | | | | | | | | | | * Rename gluster.py to glupy.py to avoid namespace conflict (#1018619) * Move the main Glupy files into glusterfs-extra-xlators rpm * Move the Glupy Translator examples into glusterfs-devel rpm * Add Glupy entry to the MAINTAINERS file BUG: 1018619 Change-Id: I48de598ba5ae8eec0e7e276bbcca1abb0e549cef Signed-off-by: Justin Clift <justin@gluster.org> Reviewed-on: http://review.gluster.org/6979 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* glusterd: op-version check for brickops.Ravishankar N2014-03-243-4/+51
| | | | | | | | | | | | | | | | | | | | | | cluster op-version must be atleast 4 for add/remove brick to proceed. This change is required for the new afr-changelog xattr changes that will be done for glusterFS 3.6 (http://review.gluster.org/#/c/7155/). In add-brick, the check is done only when replica count is increased because only that will affect the AFR xattrs. In remove-brick, the check is unconditional failing which there will be inconsistencies in the client xlator names amongst the volfiles of different peers. Change-Id: If981da2f33899aed585ab70bb11c09a093c9d8e6 BUG: 1066778 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/7122 Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: persistent client xlator/ afr changelog namesRavishankar N2014-03-249-3/+92
| | | | | | | | | | | | | | | | | | | | | | | | | -Add a unique brick-id field to glusterd_brickinfo_t -Persist the id to the brickinfo file -Use the brick-id as the client xlator name during vol create, add-brick and replace-brick operations. -For older volumes,generate the id in-memory during glusterd restore but defer writing it to the brickinfo file until the next volume set operation. -send and receive the brick-ids during peer probe. Feature page: www.gluster.org/community/documentation/index.php/Features/persistent-AFR-changelog-xattributes Related patch: http://review.gluster.org/#/c/7122 Change-Id: Ib7f1570004e33f4144476410eec2b84df4e41448 BUG: 1066778 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/7155 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* encryption/crypt: Add mem-accounting for crypt xlatorPranith Kumar K2014-03-222-0/+20
| | | | | | | | | | | Without these changes crypt.t crashes when compiled with -DDEBUG Change-Id: I1f7372aa30a09dbe3ae81d1dd598cf36e17fe0b7 BUG: 1030058 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/7319 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Glusterd/Remove-brick: Reconfigure the nfs server volfile upon remove-brick ↵Susant Palai2014-03-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | start Problem : For remove-brick start operation all client volfiles are reconfigured except nfs server volfile. Hence, even after layout is fixed by the rebalance process, the nfs clients dont see the change and go on creating directories and files in the decommissioned brick which leads to data loss after remove-brick commit. Solution : Reconfigure the nfs server volfile for remove-brick start credit: kaushal@redhat.com spalai@redhat.com Change-Id: Ib8cd8b45a9e1f888d5e00dff65cdf77c1613a2af BUG: 1070734 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/7162 Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* debug/io-stats:fix compile warningRavishankar N2014-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Compiler Warning: --------------------------------------------------------- io-stats.c: In function 'io_stats_dump': io-stats.c:950:24: warning: comparison between 'gf1_cli_stats_op' and 'enum gf1_cli_info_op' [-Wenum-compare] if (op == GF_CLI_INFO_ALL || io-stats.c:951:24: warning: comparison between 'gf1_cli_stats_op' and 'enum gf1_cli_info_op' [-Wenum-compare] op == GF_CLI_INFO_CUMULATIVE) ^ --------------------------------------------------------- Fix: Use the appropriate enum in function defintion of io_stats_dump(). Note: Using the same BZ ID as the commit that introduced this argument. Change-Id: I24e1aaf9ab86b4f337e3daa729d561ec208f2a95 BUG: 1030580 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/7217 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: refactorAnand Avati2014-03-2231-19320/+8805
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove client side self-healing completely (opendir, openfd, lookup) - Re-work readdir-failover to work reliably in case of NFS - Remove unused/dead lock recovery code - Consistently use xdata in both calls and callbacks in all FOPs - Per-inode event generation, used to force inode ctx refresh - Implement dirty flag support (in place of pending counts) - Eliminate inode ctx structure, use read subvol bits + event_generation - Implement inode ctx refreshing based on event generation - Provide backward compatibility in transactions - remove unused variables and functions - make code more consistent in style and pattern - regularize and clean up inode-write transaction code - regularize and clean up dir-write transaction code - regularize and clean up common FOPs - reorganize transaction framework code - skip setting xattrs in pending dict if nothing is pending - re-write self-healing code using syncops - re-write simpler self-heal-daemon Change-Id: I1e4080c9796c8a2815c2dab4be3073f389d614a8 BUG: 1021686 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6010 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* build: do not create versioned <xlator>.so filesNiels de Vos2014-03-215-7/+7
| | | | | | | | | | | | | | | | | | There has been a misspelled option in the Makefile.am files. The option is called -avoid-version, and not -avoidversion. It is not trivial to provide a test-case for this. One way would be to check generated RPMs with a command like this (output should be empty): $ rpm -qlp *.rpm | grep -E '/xlator/.+.so.0' Change-Id: I2a6cc557eada4d098b73af5a254f8c75707543da BUG: 1078365 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/7299 Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* geo-rep/glusterd: Fix geo-rep status on introduction of volume lockKotresh H R2014-03-211-17/+14
| | | | | | | | | | | | | | | | | | | | Getting op context in 'glusterd_op_gsync_set' is no longer valid as it is expected that 'rsp_dict' sent from caller is filled. It was fine till now as no one was setting the op context. The introduction of volume locks sets it, consequently breaking geo-rep status command. Hence the code that gets dict from op context if present is removed. Also corrected some indentation issues in 'glusterd_op_gsync_set' Signed-off-by: Kotresh H R <khiremat@redhat.com> Change-Id: Ieacd6e6c9be3c92159f849caca2acf5aabca1e32 BUG: 1077697 Signed-off-by: Kotresh H R <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/7289 Reviewed-by: Avra Sengupta <asengupt@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* build: Remove cmockery2 from repoLuis Pabon2014-03-172-36/+0
| | | | | | | | | | | | | | | | While we wait for cmockery2 to be available from Fedora, we can remove cmockery2 from the repo. BUG: 1077011 Change-Id: I75d462c607cd376a5d838ea83f4d12eb59757e73 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/7281 Reviewed-by: Justin Clift <justin@gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* storage/bd: Fix allocations/deallocationsPranith Kumar K2014-03-086-22/+46
| | | | | | | | | Change-Id: I39c9eb083fc1c144fe6f011dd983b877fbbff0f7 BUG: 1075717 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/7230 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* features/quota: fix the dict leak when quota is offVarun Shastry2014-03-121-2/+2
| | | | | | | | | Change-Id: Iafe0c5104e38a1e34de1f2c2a19682178eb60e11 BUG: 1075506 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/7227 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* locks: fix unconditional op_ret success of entrylkAnand Avati2014-03-121-2/+3
| | | | | | | | | | | | | | | Bug introduced in recent refactoring. op_ret of entrylk() was always getting set to 0 even though second locker wouldn't have gotten a lock. This was resulting in multiple contenders to get locks granted at the same time. Change-Id: I99c187a9285fb80cc500b38f468f2ebda7048cab Signed-off-by: Anand Avati <avati@redhat.com> BUG: 849630 Reviewed-on: http://review.gluster.org/7224 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* glusterd: send/receive volinfo->caps during peer probe.Ravishankar N2014-03-081-0/+12
| | | | | | | | | | | | | | | Problem: volinfo->caps was not sent over to newly probed peers, resulting in a 'Peer Rejected' state due to volinfo checksum mismatch. Fix: send/receive volinfo capability when peer probing. Change-Id: I2508d3fc7a6e4aeac9c22dd7fb2d3b362f4c21ff BUG: 1072720 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/7186 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Fixed typo in console message during volume createSatheesaran2014-03-081-1/+1
| | | | | | | | | | | | | | | | While creating a volume, if the brick is created on the root partition, then the error statement is thrown. This error statements was containing two "is" in it. Removed one of the "is" Change-Id: I0d83f0feccda34989f7e2b97041d1f15ec9e2f00 BUG: 1065551 Signed-off-by: Satheesaran <satheesaran@gmail.com> Reviewed-on: http://review.gluster.org/7198 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* build: GlusterFS Unit Test FrameworkLuis Pabon2014-03-065-0/+232
| | | | | | | | | | | | | | | | | | | | This patch will allow for developers to create unit tests for their code. Documentation has been added to the patch and is available here: doc/hacker-guide/en-US/markdown/unittest.md Also, unit tests are run when RPM is created. BUG: 1067059 Change-Id: I95cf8bb0354d4ca4ed4476a0f2385436a17d2369 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/7145 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Justin Clift <justin@gluster.org> Tested-by: Justin Clift <justin@gluster.org>
* rpc: transport may be destroyed while rpc isn'tKrishnan Parthasarathi2014-03-053-4/+4
| | | | | | | | | | | | | | | | rpc_clnt object is destroyed after the corresponding transport object is destroyed. But rpc_clnt_reconnect, a timer driven function, refers to the transport object beyond its 'life'. Instead, using the embedded connection object prevents use after free problem wrt transport object. Also, access transport object under conn->lock. Change-Id: Iae28e8a657d02689963c510114ad7cb7e6764e62 BUG: 962619 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6751 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Reduce logging caused by non-existing extended attributesNiels de Vos2014-03-012-3/+7
| | | | | | | | | | | | | | | | | This changes the following log messages from INFO (default value) to DEBUG. We do not really care if someone tries to read extended attributes that do not exist. [2013-12-09 12:19:05.924497] E [posix.c:3539:posix_fgetxattr] 0-dis-rep-posix: fgetxattr failed on key system.posix_acl_access (No data available) [2013-12-09 12:19:05.924545] I [server-rpc-fops.c:863:server_fgetxattr_cbk] 0-dis-rep-server: 13074: FGETXATTR 1 (b8381953-ffa5-40fa-90dd-ae122335cc4b) (system.posix_acl_access) ==> (No data available) Change-Id: Idbbeb026f81e67025a2b36d7bfeb125ad2a1f61b BUG: 1027174 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/7171 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Anand Avati <avati@redhat.com>
* write-behind: track filesize when doing extending writesNiels de Vos2014-02-271-4/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A program that calls mmap() on a newly created sparse file, may receive a SIGBUS signal. If SIGBUS is not handled, a segmentation fault will occur and the program will exit. A bug in the write-behind translator can cause the creation of a sparse file created with open(), seek(), write() to be cached. The last write() may not be sent to the server, until write-behind deems this necessary. * open(.., O_TRUNC, ...)/creat() the file, it is 0 bytes big * seek() into the file, use offset 31 * write() 1 byte to the file * the range from byte 0-30 are unwritten so called 'sparse' The following illustration tries to capture this: Legend: [ = start of file _ = unallocated/unwritten bytes # = allocated bytes in the file ] = end of file [_______________#] | | '- byte 0 '- byte 31 Without this change, reading from byte 0-30 will return an error, and reading the same area through an mmap()'d pointer will trigger a SIGBUS. Reading from this range did not trigger the outstanding write() to be flushed. The brick that receives the read() (translated over the network from mmap()) does not know that the file has been extended, and returns -EINVAL. This error gets transported back from the brick to the glusterfs-fuse client, and translated by the Linux kernel/VFS into SIGBUS triggered by mmap(). In order to solve this, a new attribute to the wb_inode structure is introduced; the current size of the file. All FOPs that can modify the size, are expected to update wb_inode->size. This makes it possible for extending writes with an offset bigger than EOF to mark the unwritten area as modified/pending. Change-Id: If5ba6646732e6be26568541ea9b12852a5d0b988 BUG: 1058663 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/6835 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* geo-rep/gfid-access: Fix errno for non-existent GFID.Kotresh H R2014-02-271-0/+5
| | | | | | | | | | | | | | | | | | | Because of http://review.gluster.org/#/c/6318/ patch, ESTALE is returned for a lookukp on non-existent GFID. But ENOENT is more appropriate when lookup happens through virtual .gfid directory on aux-gfid-mount point. This is avoids confusion for the consumers of gfid-access-translator like geo-rep which expects ENOENT. Change-Id: I4add2edf5958bb59ce55d02726e6b3e801b101bb BUG: 1069191 Signed-off-by: Kotresh H R <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/7154 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* feature/compress: Validate option and enable docPrashanth Pai2014-02-263-56/+52
| | | | | | | | | | | | | | | | | * Validate network.compression option * Enable descriptions of xlator configurable options * Improve indentation in code * Make network.compression.mode not configurable by user. This is similar to "iam-self-heal-daemon" option in AFR xlator. Fixes BUGs: 1065658, 1065640, 1065655 Change-Id: I99d82b574ee0e5c8c2baf5f5d52dbf8d015d330a BUG: 1065640 Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/7024 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* performance/io-threads: Remove code duplicationPranith Kumar K2014-02-241-1896/+78
| | | | | | | | | Change-Id: Ic905cc6074c796efce2972857b79ab53700a2de4 BUG: 1065657 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/7010 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Check for ctx before dereferencing it.Raghavendra Talur2014-02-201-6/+8
| | | | | | | | | | | Fix for coverity CID: 1175010 & 1175011 Change-Id: Ib894fadf94c36704166ac0e2a3b6febf9b3fe446 BUG: 789278 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/7025 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>