summaryrefslogtreecommitdiffstats
path: root/xlators
Commit message (Collapse)AuthorAgeFilesLines
* protocol: Fix a possible memory leak.Poornima2014-06-111-3/+2
| | | | | | | | | | Change-Id: Ia3e7e33389b4d3a5e058b6b2fb2f1c3cb224d6fd BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6950 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd/snapshot : Store the global snapshot config limit in options.Sachin Pandit2014-06-116-88/+245
| | | | | | | | | | | | | | | | | | | | Problem : Initially we used to save the global config limit in glusterd.info, The problem with that approach was glusterd.info is local to a particular glusterd and hence is not synced during the handshake of glusterds. Solution : Store the global snapshot config in options, which is synced during handshake. Change-Id: I4c688bb4052a57df28aadba8581b14e2ddb510ef BUG: 1104642 Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/7971 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* features/locks: Clean up logging of cleanup in DISCONNECT codepathKrutika Dhananjay2014-06-114-69/+126
| | | | | | | | | | | | | | | | | | | Now, gfid is printed as opposed to path in cleanup messages. Also, refkeeper update is eliminated in inodelk and entrylk. Instead, the patch ensures inode and pl_inode are kept alive as long as there is atleast one lock (granted/blocked) on an inode. Also, every inode is unref'd appropriately on a DISCONNECT from the lock-owning client. Change-Id: I531b1a02fe1b889fdd7f54b1fd522e78a18ed1df BUG: 1104915 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/7981 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* glusterd/snapshot: Remove mnt pt, while removing lvmAvra Sengupta2014-06-102-38/+68
| | | | | | | | | | | | | | | | | | | | | During a delete/restore snapshot remove the mnt point dir created at /var/run/gluster/snaps along with the lvm mounted on it. Also removed glusterd_recreate_vol_brick_mounts and renamed glusterd_store_recreate_brick_mounts as glusterd_recreate_vol_brick_mounts, inorder to reduce redundant multiple calls Change-Id: Ie87907ebbf8ef790fba07ef8581d2eb8d55658d0 BUG: 1101463 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/7889 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd/snapshot: Don't update the snap volume's op_versionAvra Sengupta2014-06-102-2/+4
| | | | | | | | | | | | | | | | | | | | | After the features.barrier key is removed from the snap_vol dict, it's op_version should also be updated, so that it doesn't inherit the op_version of the original volume when it had the key set. Also in glusterd_volinfo_dup(), which duplicates volinfo the volume op_version should not be updated, rather the original volume's op_version should be used. Change-Id: Ib2250700f649e6c906b14aeccee5e78f71d69780 BUG: 1104944 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/7986 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* gsyncd / geo-rep: FSH recommended log locationsVenky Shankar2014-06-102-1/+15
| | | | | | | | | | | | | | | | Upgrading "working_dir" on the fly is a bit unclean yet (though it works) as currently config upgrade does not support "old" values to be expanded by using configuration variables. Change-Id: I44ed65c281f2e0ce3b6b467addc5c1c88ac674e7 BUG: 1077516 Signed-off-by: Venky Shankar <vshankar@redhat.com> Signed-off-by: Kotresh H R <khiremat@redhat.com> Signed-off-by: Aravinda VK <avishwan@redhat.com> Signed-off-by: Ajeet Jha <ajha@redhat.com> Reviewed-on: http://review.gluster.org/7375 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* features/gfid-access: Fix inode leaks and loc path corruptionPranith Kumar K2014-06-102-7/+9
| | | | | | | | | | Change-Id: Ib506db28415d57b344aa90e07e74666ad2063c64 BUG: 1104919 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8009 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/changelog: skipping empty changelogs in historyAjeet Jha2014-06-102-17/+9
| | | | | | | | | | | | | Empty changelgs are unlinked and htime-update is bypassed while publishing partially written changelog. Change-Id: I1533ad431e4fbf592d2f38837fce782932d01e9c BUG: 1105466 Signed-off-by: Ajeet Jha <ajha@redhat.com> Reviewed-on: http://review.gluster.org/7949 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
* glusterd/snapshot : Dont create quota.conf if quota is not enabled.Sachin Pandit2014-06-101-9/+14
| | | | | | | | | | | | | | | | | | | Problem : Quota.conf was getting created during handshake of glusterds even if quota was not enabled. Solution : Check if quota is enabled. If not, then dont create quota.conf. Change-Id: I55ae487aab5759b25a561705645c1c77ff108670 BUG: 1101483 Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/7934 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* feature/changelog: Add timeout to changelog barrier.Kotresh H R2014-06-105-7/+105
| | | | | | | | | | | | | | | | | | | This patch introduces configurable 'changelog-barrier-timeout' in changelog. The default changelog-barrier-timeout is set to 120 sec which is same as barrier-timeout of barrier translator. On this timeout, all the barriered fops are unbarriered. It is safe to have this internal timeout for changelog barrier to prevent it from indefinite barrierring of fops if barrier disable notification does not come from snapshot for some reason. Change-Id: Iad07807935f88222cdefcd46312b4b6579186dce BUG: 1094226 Signed-off-by: Kotresh H R <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/7669 Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
* glusterd : glusterd message-id comments to support extracting the msg-idAtin Mukherjee2014-06-101-0/+122
| | | | | | | | | | | | | | description through doxygen Change-Id: Ic9660519ae505b78e976e092e7ac80ae63b12a7f BUG: 1075611 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/7867 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Pavithra Srinivasan <psriniva@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* features/gfid-access: Fix memory leaks.Raghavendra G2014-06-101-1/+27
| | | | | | | | | | | Change-Id: I90f6cdb1c8c4face1bb72a9cc77818d308389e45 BUG: 1104919 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/7982 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* mgmt/glusterd: delete only the oldest snapshot as part of autodeleteRaghavendra Bhat2014-06-091-27/+21
| | | | | | | | | | | | | | | | | | | | | | | | Now this is how autodelete behaves: 1) Upon creation when the max-soft-limit exceeds, the oldest snapshot is deleted. i.e if hard limit is 100 and by default soft limit is 90. Whenever snap count reaches 90, every new create results in the deletion of the oldest snapshot. 2) If the snap limit (hard) is reconfigured and brought down the current snap count, then no snapshot is deleted and the next snapshot create fails as the current snapcount is more than the hard limit. 3) When soft limit is brought down: say max limit is 100 and by default soft limit is 90 and current snap count is 90. Now, soft limit is changed to 70 (70%). In this case the snapshot count remains 90 itself (i.e extra 20 snapshots more than the soft limit are not deleted) and for every new create the oldest snapshot is deleted. Change-Id: I1f3b4b9eb093649f8628ebf09a15bd2570ddf340 BUG: 1103665 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/7951 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* glusterd: Better op-version values and rangesKaushal M2014-06-098-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | | Till now, the op-version was an incrementing integer that was incremented by 1 for every Y release (when using the X.Y.Z release numbering). This is not flexible enough to handle backports of features into Z releases. Going forward, from the upcoming 3.6.0 release, the op-versions will be multi-digit integer values composed of the version numbers, instead of a simple incrementing integer. An X.Y.Z release will have XYZ as its op-version. Y and Z will always be 2 digits wide and will be padded with 0 if required. This way of bumping op-versions allows for gaps in between the subsequent Y releases. These gaps will allow backporting features from new Y releases into old Z releases. Change-Id: I463f82902d997ec07e76dae58ac935f33e6393c2 BUG: 1104997 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/7963 Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* snapview-server: coverity fixesRaghavendra Bhat2014-06-091-7/+10
| | | | | | | | | | Change-Id: If4c866b1155bedabd5cf65dae22fa565b7440938 BUG: 1094815 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/7975 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* mgmt/glusterd : Import the global options irrespective of change inSachin Pandit2014-06-091-3/+7
| | | | | | | | | | | | | | | | | | | | volume information. Problem : global options maintained by glusterd was getting synced only when there was change in volume information. Solution : Import the global option irrespective of change in volume information. Change-Id: I9e59b3cb25bdc19601a09fcf8df2e31a8481ece0 BUG: 1104642 Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/7970 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* gNFS: Make NFS DRC off by defaultNiels de Vos2014-06-092-2/+2
| | | | | | | | | | | | | | | DRC in NFS causes memory bloat and there are known memory corruptions. It would be good to disable drc by default till the feature is stable. Change-Id: I93db6ef5298672c56fb117370bb582a5e5550b17 BUG: 1105524 Original-patch-by: Santosh Kumar Pradhan <spradhan@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/8004 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Rebalance: Avoid setting other component's xattrsSusant Palai2014-06-081-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem 1: In "gf_defrag_handle_hardlink" we used to do setxattr on internal afr keys. Which lead to afr aborting the op saying "operation not supported". Solution : Sending a new xattr with only required keys. Problem 2: Hardlink migration tries to create linkto files for 2nd to (n-1)th hardlink of a file on their respective hashed_subvolumes. It may so happen that the linkto file already exists on the hashed subvolume may be due to an earlier lookup or hashed subvolume on the older graph is same as that on the new graph. Hence any new link call may fail with EEXIST. Solution: Will log the message with DEBUG level for EEXIST . Otherwise will log with ERROR level. Change-Id: I51f9bfc8cf5b9d8e94a9d614391662fddc0874d4 BUG: 1066798 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/7943 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/gfid-access: calloc gfid and set in xdataRavishankar N2014-06-081-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: the gfid passed to ga_fill_tmp_loc() was a stack variable which the function set in the xdata dictionary. Accessing it in a later point in time gave unexpected values. This was easy to hit when AFR was involved like so: ga_mknod()--->xxx-->afr_mknod(): In afr_mknod transaction, once the stack-winds for the lock-phase are sent, the gfid in xdata becomes out of scope. When we send the actual op i.e. afr_mknod_wind(), the gfid in xdata is stale, causing posix to set junk gfids on the files. Fix: calloc the gfid and set it in the dict. Thanks to Pranith for the RCA! Change-Id: I0291fce34745268dc63095fc41fe31c7213dd5e1 BUG: 1104707 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/7978 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gluster: Set ping-timeout between glusterd peer rpc connectionVijaikumar M2014-06-061-0/+5
| | | | | | | | | | | | | | | With Patch# http://review.gluster.org/#/c/7753/, ping-timeout got disabled between glusterd peer rpc connection. This would create regression for bug#1034479 Change-Id: Ib7a756fce7d349ce5b7b4c6a287f2d040c83fc76 BUG: 1097224 Signed-off-by: Vijaikumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/7989 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd: Preserve backward compatibility during sync and storeKaushal M2014-06-052-168/+386
| | | | | | | | | | | | | | | | | | | | | | | | | | The glusterd volinfo struct gained several new members to support the volume snapshot feature. These members are also being exported/imported during volume sync and being stored/restored. This export/import and save/restore explicitly required these members to be present, and would fail if they were not. This lead to the failure of backward compatibility, preventing new peers from correctly interacting with older peers (especially during a rolling upgrade). This patch contains changes needed to preserve the backward compatibility in the places specified. The snapshot members of the volinfo will now be exported/imported and stored only when the cluster op-version is >= 4, ie. all peers in the cluster support snapshot. No change is required for the restore code as, the new members will be left at the default zero values if corresponding entries are absent in the stored volinfo. Change-Id: I79e4bc5780c991ec305b7b5e7d71c16afb6a4c40 BUG: 1101903 Reviewed-on: http://review.gluster.org/7944 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* feature/geo-rep: Fix to retain pause state of gsyncd on restart.Kotresh H R2014-06-053-9/+17
| | | | | | | | | | | | | | | A new gsyncd options '--pause-on-start' is introduced. When node reboots, if the status is paused, gsyncd is started with this option. After gsyncd spawns worker and agent, worker will send SIGSTOP to negative pid of monitor to enter pause mode. Change-Id: I5aad82c9a9fc8c243f384940b77d25e26e520d6d BUG: 1101410 Signed-off-by: Kotresh H R <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/7885 Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
* glusterd: Handle rpc_connect failure in the event handlerVijaikumar M2014-06-054-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently rpc_connect calls the notification function on failure in the same thread, glusterd notification holds the big_lock and hence big_lock is released before rpc_connect In snapshot creation, releasing the big-lock before completeing operation can cause problem like deadlock or memory corruption. Bricks are started as part of snapshot created operation. brick_start releases the big_lock when doing brick_connect and this might cause glusterd crash. There is a similar issue in bug# 1088355. Solution is let the event handler handle the failure than doing it in the rpc_connect. Change-Id: I088d44092ce845a07516c1d67abd02b220e08b38 BUG: 1101507 Signed-off-by: Vijaikumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/7843 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* features/quota: unref and set priv->rpc_clnt to NULL once disabled.Raghavendra G2014-06-052-14/+31
| | | | | | | | | Change-Id: Ic1a6bc36b26cf31f00644bd674b24daa11745e64 BUG: 1103636 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/7876 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd/snapshot : Remove the barrier key from snap volinfoSachin Pandit2014-06-041-0/+9
| | | | | | | | | | | | | | | | | | | before generating brick volfile. Problem : During snapshot creation if I/O is in progress, then barrier value is enabled. Hence during snapshot create and in-turn snapshot restore the barrier value is set to enable. Because of this further I/O on the mount point fails. Solution : Remove the barrier key from newly created snap volinfo before generating the brick volfiles. Change-Id: I180b3adfbb364159fd353b2d0fb630e004099aa5 BUG: 1098487 Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/7892 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* mgmt/glusterd: return proper value upon quorum failure in snapshot createRaghavendra Bhat2014-06-041-1/+3
| | | | | | | | | | | Change-Id: I5474a7cdf03236121bef383955ab403e945cd7ae BUG: 1101561 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/7961 Reviewed-by: Sachin Pandit <spandit@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* glusterd/status : First fetch the snapcount and then send the rpc callSachin Pandit2014-06-031-162/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | for individual snapshots for snapshot status Problem : Initially, we used to do all the calculation in the glusterd side, once all the information related to snap was fetched, it was aggregated into one dictionary and that was sent back to CLI. Problem with this approach was, when number of snapshots are very high then CLI will timeout. Solution: First fetch snapcount and snapname from glusterd, then make a individual calls using the snapname fetched. This will resolve the timeout problem. Change-Id: I32609b3898ed227c804dd4d8ee4516f081240756 BUG: 1087676 Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/7456 Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd: Changes to provide interface for USSVarun Shastry2014-06-0312-175/+955
| | | | | | | | | | | | | | | The changes which consists of the translators for the USS (User Servicable Snapshots) is submitted as a separate patch. Current patch provides the CLI access to the feature. Change-Id: I6b98a42fcfa82f0870d8048fe0bb53141565e9c6 BUG: 1094815 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/7705 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* snapview-server: use telldir api to get the offset of the dentryRaghavendra Bhat2014-06-021-3/+3
| | | | | | | | | | | | | | | | | * dirent structure (struct dirent) in NetBSD does not contain the offset member. Direct access of offset from struct dirent (used here to copy its contents to gf_dirent_t structure after making readdir call) causes glusterfs build failures on NetBSD. So like posix does, use telldir api to get the offset of the dentry (in this case glfs_telldir). Change-Id: I72472c16cbf55dd99ea80ba982b0a4205e6ebffb BUG: 1103591 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/7946 Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Fetching the txn_id before performing glusterd_op_bricks_select in ↵Avra Sengupta2014-06-024-42/+51
| | | | | | | | | | | | | | | | | | | | glusterd_brick_op() In glusterd_brick_op(), the txn_id mut be fetched before failing the transaction for any other reason. Moving the fetching of txn_id to the beginning of the function. Also initializing txn_id to priv->global_txn_id where it wasn't initialized. Change-Id: I44d7daa444f00a626f24670c92324725f6c5fb35 BUG: 1102656 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/7926 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* cluster/dht: Fix min-free-disk calculations when quota-deem-statfs is onKrutika Dhananjay2014-06-022-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEM: As part of file creation, DHT sends a statfs call to all of its sub-volumes and expects in return the local space consumption and availability on each one of them. This information is used by DHT to ensure that atleast min-free-disk amount of space is left on each sub-volume in the event that there ARE other sub-volumes with more space available. But when quota-deem-statfs is enabled, quota xlator on every brick unwinds the statfs call with volume-wide consumption of disk space. This leads to miscalculation in min-free-disk algo, thereby misleading DHT at some point, into thinking all sub-volumes have equal available space, in which case DHT keeps sending new file creates to subvol-0, causing it to become 100% full at some point although there ARE other subvols with ample space available. FIX: The fix is to make quota_statfs() behave as if quota xlator weren't enabled, thereby making every brick return only its local consumption and disk space availability. Change-Id: I211371a1eddb220037bd36a128973938ea8124c2 BUG: 1099890 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/7845 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* mgmt/glusterd: return failure when server quorum is not metRaghavendra Bhat2014-06-011-1/+2
| | | | | | | | | | | Change-Id: I0a7df141d01cf70da5aac9658b2a5a19f660dd3b BUG: 1101561 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/7894 Reviewed-by: Sachin Pandit <spandit@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* storage/posix: Remove special handling of ENOTSUP for [f]setxattr.Pranith Kumar K2014-05-311-18/+2
| | | | | | | | | | | Change-Id: I7df7b2263336af0abe5bc91c674f9401aff6c3e0 BUG: 1098794 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/7788 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: Add descriptions to message-ids.Ravishankar N2014-05-301-0/+75
| | | | | | | | | | | | Change-Id: I7ec2821c96d4cbff78b4959d9b07019896cc9a2c BUG: 1075611 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/7840 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* cli: 'Snapshot Volume: yes/no' for volume info needs to be removedVijaikumar M2014-05-291-15/+0
| | | | | | | | | | | | | | | | | | | | With initial design where the snap volume used to be displayed in gluster volume info, we used "Snap Volume: yes/on" to distinguish the volume whether its a snap volume or the original volume. But with new design the snap volumes are not listed in the volume info, hence this entry (snap volume:) doesn't make sense to show. Change-Id: Ic5b9948bf4ef74e89a611742c74a8989cb406866 BUG: 1098910 Signed-off-by: Vijaikumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/7794 Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Sachin Pandit <spandit@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd/snapshot: Use external umount for un-mounting snapshotVijaikumar M2014-05-293-17/+43
| | | | | | | | | | | | | | | umount2 doesn't cleanup /etc/mtab entry after doing umount, so use external umount command for un-mount operation. Change-Id: I1a91a700433e2bf15dd21e6fcdd9da54441048d1 BUG: 1098084 Signed-off-by: Vijaikumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/7775 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* features/glupy: GPLv2 or LGPLv3+ licenseKaleb S. KEITHLEY2014-05-293-30/+22
| | | | | | | | | Change-Id: I1ce4735619ac03a81f6ed43bba27c9fbb25c4de1 BUG: 1102305 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/7917 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* rpm: Rename old hookscripts in an RPM-standard way.Poornima G2014-05-291-1/+2
| | | | | | | | | | | Change-Id: I5e47ac8af8033821787281574276f38933de73cf BUG: 1100251 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/7362 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* user servicable snapshotsRaghavendra Bhat2014-05-2915-9/+4404
| | | | | | | | | | Change-Id: Idbf27dbe088e646a8ab81cedc5818413795895ea Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Signed-off-by: Anand Subramanian <anands@redhat.com> Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/7700 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Posix/readdirp : Avoid filling wrong stat info for dentry in readdirpSusant Palai2014-05-281-2/+5
| | | | | | | | | | | | | | | | | Problem: Upon no entry found for a dentry, posix_readdirp_fill used to fill the stat for the current entry with the previous one. Solution: Continue with other entries if lstat failed for current one Change-Id: Ic96b5900451ed6c8de59acf9fee2e116649d3cdb BUG: 1096578 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/7733 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* DHT: Wrong error handling in gf_defrag_migrate_dataSusant Palai2014-05-281-9/+10
| | | | | | | | | | | | | | | | | | | | | | Problem: Because of the condition (err = op_errno), err was set to zero always and ENOSPC error will be logged always. "dht_check_free_ space" was returning 1 and it was mapped to EPERM in "rebalance_task _completion". Solution: Changed the return value in dht_check_free_space to -1 as in rebalance_task_completion op_ret value -1 is mapped to ENOSPC. And fixed the wrong error condition after syncop_setxattr in gf_defrag_migrate_data. Change-Id: I474ea1bef3b1e34c89814ed0091dd02bd5b63737 BUG: 1054703 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/6727 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* DHT/Mkdir: Fail mkdir with ENOENT, if parent is not availableSusant Palai2014-05-281-3/+3
| | | | | | | | | | Change-Id: I54227bcafb6d0d8cf716a679d2a34be7fc916898 BUG: 1078847 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/7306 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: Don't support heal info healed/heal-failed commandsPranith Kumar K2014-05-273-32/+31
| | | | | | | | | | Change-Id: Iecfd3150e4f4e795e3403bcb1ac56340759a37d0 BUG: 1098027 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/7766 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/changelog: NULL termination after memcpy should be of dest pointerHarshavardhana2014-05-272-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | snippet code < ..memcpy (bufff, src, len - 1); ..*(src + len) = '\0'; ---> Wrong! > Source buffer lvalue() referencing with offset style NULL termination is wrong and unnecessary when we have a destination buffer, it is the destination buffer which should look to be NULL terminated Makes it more readable and also clearly logical. < ..memcpy (bufff, src, len - 1); ..bufff[len -1] = '\0'; ---> Correct! > Change-Id: I6d7f312aaa5c541f0345649ff1ef9f193892b674 BUG: 1099986 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/7836 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
* glusterd/snapshot: Invoke restore cleanup for missed restoresAvra Sengupta2014-05-272-0/+15
| | | | | | | | | | | | | | | | While performing missed restores invoke restore cleanup, to cleanup the snap file (from which the vol was restored) and also the old volinfo and if the old volume is a restored volume, then its lvm too. Change-Id: Ifa5700c69f49fa0e22e0060a039c2e5c0b02b585 BUG: 1100324 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/7848 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* Glusterd/Rebalance: Update rebalance status properly inSusant Palai2014-05-262-0/+11
| | | | | | | | | | | | | | node_state.info credit: kaushal@redhat.com spalai@redhat.com Change-Id: I08d0771e2168a4a6ebd473e8a937b8b2eda1341a BUG: 1075087 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/7214 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* mgmt/glusterd: Allow mount/umount requests over AF_INETVijay Bellur2014-05-252-7/+11
| | | | | | | | | | | | | | | | Along with a simple naming convention change to avoid confusion as per below. s/gd_svc_cli_prog_ro/gd_svc_cli_trusted_progs/ s/gd_svc_cli_actors_ro/gd_svc_cli_trusted_actors/ Change-Id: Ibc73d88846636656f060a811f641f37a1a864615 BUG: 1077452 Original-Author: Vijay Bellur <vbellur@redhat.com> Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/7821 Reviewed-by: Kotresh HR <khiremat@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* meta: fix compile warningAnand Avati2014-05-241-1/+1
| | | | | | | | | | | Change-Id: Ic346458b0e7264469d617b8313d4087b4b21c4b8 BUG: 1089216 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/7789 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* libglusterfs: Fix unused variable warningPranith Kumar K2014-05-241-2/+0
| | | | | | | | | Change-Id: If385ba0993fdbd3e3b7500b2b6631721911e0ab3 BUG: 1100144 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/7858 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd/vol_locks: Dereference ctx->dict, only if ctx != NULLAvra Sengupta2014-05-231-6/+6
| | | | | | | | | | | Change-Id: I7f753aff197fe08fad255fc75d7f88d2a4632de8 BUG: 1100325 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/7849 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Sachin Pandit <spandit@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>