summaryrefslogtreecommitdiffstats
path: root/xlators
Commit message (Collapse)AuthorAgeFilesLines
* quota: don't log error when disk quota exceededvmallika2015-06-171-4/+10
| | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/11135 > When disk quota exceeded, quota enforcer logs > alert message, so no need to log error message > as this can fill up the log file > > Change-Id: Ia913f47bc0cedb7c0a9c611330ee5124d3bb6c9d > BUG: 1229609 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I7b0b91965d8eb1b38ef6fa5ce0276a6b6da3372d BUG: 1232135 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11242 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* protocol/client : porting log messages to new frameworkManikandan Selvaganesh2015-06-179-505/+1346
| | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/10042/ Cherry picked from 379dbbfd683d2b0e1704c098b1f020567328122c > Change-Id: I9bf2ca08fef969e566a64475d0f7a16d37e66eeb > BUG: 1194640 > Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> > Reviewed-on: http://review.gluster.org/10042 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> > Tested-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I9bf2ca08fef969e566a64475d0f7a16d37e66eeb BUG: 1217722 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/11240 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* cluster/afr: Do not attempt entry self-heal if the last lookup on entry ↵Krutika Dhananjay2015-06-171-2/+9
| | | | | | | | | | | | | | | | | | | | | failed on src Backport of: http://review.gluster.org/11119 Test bug-948686.t was causing shd to dump core due to gfid being NULL. This was due to the volume being stopped while index heal's in progress, causing afr_selfheal_unlocked_lookup_on() to fail sometimes on the src brick with ENOTCONN. And when afr_selfheal_newentry_mark() copies the gfid off the src iatt, it essentially copies null gfid. This was causing the assertion as part of xattrop in protocol/client to fail. Change-Id: I5e6e3f00bc1a98cad7fd55cc3a6459d60ec8b0fe BUG: 1229550 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/11131 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* changetimerecorder : port log messages to a new frameworkMohamed Ashiq2015-06-174-125/+198
| | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/10938/ Cherry picked from 00f9a61fe8884062c141edd662424625d349a377 >Change-Id: I66e7ccc5e62482c3ecf0aab302568e6c9ecdc05d >BUG: 1194640 >Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com> >Reviewed-on: http://review.gluster.org/10938 >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Joseph Fernandes >Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com> Change-Id: I66e7ccc5e62482c3ecf0aab302568e6c9ecdc05d BUG: 1217722 Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com> Reviewed-on: http://review.gluster.org/11195 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Joseph Fernandes Tested-by: Joseph Fernandes
* tier/volume set: Validate volume set option for tierMohammed Rafi KC2015-06-162-4/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Volume set option related to tier volume can only be set for tier volume, also currently all volume set i for tier option accepts a non-negative integer. This patch validate both condition. Back port of: >Change-Id: I3611af048ff4ab193544058cace8db205ea92336 >BUG: 1216960 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Signed-off-by: Dan Lambright <dlambrig@redhat.com> >Reviewed-on: http://review.gluster.org/10751 >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Joseph Fernandes (cherry picked from commit f6a062044a3447bea5bf0fcf21a3f85c00fb6c7d) Change-Id: Ic6081f0ce7ae7effac69ba192bd35c8d382a11d5 BUG: 1230560 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/11173 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Joseph Fernandes Tested-by: Joseph Fernandes
* glusterd/tier: glusterd crashed with detach-tier commit forceMohammed Rafi KC2015-06-162-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | glusterd crashed when doing "detach-tier commit force" on a non-tiered volume. >Change-Id: I884771893bb80bec46ae8642c2cfd7e54ab116a6 >BUG: 1228112 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/11081 >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Joseph Fernandes >Reviewed-by: Dan Lambright <dlambrig@redhat.com> >Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> (cherry picked from commit fefc8730e2a87db41d5f79c9853a14cab86715e5) Change-Id: Ia536da3ec4c632d7d1cc1575dd2b7b098a2c7aec BUG: 1230563 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/11174 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Joseph Fernandes Tested-by: Joseph Fernandes
* rebalance,store,glusterd/glusterd: porting to new logging framework.Nandaja Varma2015-06-163-324/+538
| | | | | | | | | | | | Backport of http://review.gluster.org/#/c/9877/ Change-Id: I231b79e3414e60fe67cde577dd585cce83c8bfad BUG: 1217722 Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com> Reviewed-on: http://review.gluster.org/11193 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* sm/glusterd: Porting messages to new logging frameworkNandaja Varma2015-06-162-294/+524
| | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/9927/ (cherry picked from commit 72a7a6ea78289b2897f9846dc4e111f442dd2788) >Change-Id: I391d1ac6a7b312461187c2e8c6f14d09a0238950 >BUG: 1194640 >Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com> >Reviewed-on: http://review.gluster.org/9927 >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Change-Id: I391d1ac6a7b312461187c2e8c6f14d09a0238950 BUG: 1217722 Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com> Reviewed-on: http://review.gluster.org/11197 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* nfs: Authentication performance improvementsShreyas Siravara2015-06-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When file operations are sent to the NFS server, authorized filehandles are cached using the exportid, mountid, gfid and host as the key to the cache. This meant that any file OR directory will always fail on the *first* fop to that filehandle since the cache used the gfid as part of the key to the cache. However, if an export is authorized, this effectively means that ALL subdirectories and files in the export directory are authorized per the permissions of the export. This results slow times to walking a directory structure over an NFS mount. Cherry picked from commit a9f58cd6cfc29a47af868fff29ce3133b9f9efe5) > Change-Id: Iad811ad7255b454d1712e75a637478401d40791e > BUG: 1232165 > Signed-off-by: Shreyas Siravara <sshreyas@fb.com> > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/11245 > Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> Change-Id: Iad811ad7255b454d1712e75a637478401d40791e BUG: 1231366 Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11256 Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* glusterd: subvol_count value for replicate volume should be calculate correctlyGaurav Kumar Garg2015-06-161-2/+2
| | | | | | | | | | | | | | | | | | | | glusterd was crashing while trying to remove bricks from replica set after shrinking nx3 replica to nx2 replica to nx1 replica. This is because volinfo->subvol_count is calculating value from old replica count value. Change-Id: I1084a71e29c9cfa1cd85bdb4e82b943b1dc44372 BUG: 1231646 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/11165 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> (cherry picked from commit 3fb18451311c34aeced1054472b6f81fc13dd679) Reviewed-on: http://review.gluster.org/11224
* NFS-Ganesha : Return correct return valueMeghana Madhusudhan2015-06-161-1/+3
| | | | | | | | | | | | | | | | When any of the nodes in the trusted pool is not listed in the cluster node list, it receives a wrong return value. And commit fails on that host. Fixing the same. This is the backport of the fix merged on master. http://review.gluster.org/#/c/11205/ Change-Id: I1a5c80ff012e56919842d1bf967b71c363a68061 BUG: 1232143 Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11243 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* glusterd: Porting messages to new logging framework.Nandaja Varma2015-06-169-44/+77
| | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/9836/ Change-Id: I56ced6fca0246c230cc389132c47a0f60472ed0c BUG: 1217722 Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com> Reviewed-on: http://review.gluster.org/9836 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit 2ae034374ce449c54b1b4ae8350401371db1d8d3) Reviewed-on: http://review.gluster.org/11221
* glusterd: Stop tcp/ip listeners during glusterd exitanand2015-06-161-3/+45
| | | | | | | | | | | | | | | | | | | | | | | | Problem : Because of race between exit thread and rpc thread causing the glusterd crash while glusterd exiting/stoping. Fix : Stop tcp/ip socket listeners in cleanup_and_exit to avoid new rpc events. Backport of : >Change-Id: Ie9280c8c9d7c350a176529375d861432f3de94ac >BUG: 1209461 >Signed-off-by: anand <anekkunt@redhat.com> >Reviewed-on: http://review.gluster.org/10197 >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Kaushal M <kaushal@redhat.com> Change-Id: Ibb3d3669e248af8c5284801d7f18c6ee26fe2ef3 BUG: 1230026 Reviewed-on: http://review.gluster.org/11154 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* storage/posix: Handle MAKE_INODE_HANDLE failuresPranith Kumar K2015-06-161-1/+7
| | | | | | | | | | | | Backport of http://review.gluster.com/11028 BUG: 1221473 Change-Id: Iefa2a9037e7a415e55581054b16c840bae56561e Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11167 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* cluster/ec: Prevent Null dereference in dht-renamePranith Kumar K2015-06-161-1/+1
| | | | | | | | | | | Backport of http://review.gluster.com/11178 BUG: 1230653 Change-Id: I708d4d84b1341fb7cb515808836721735dc63f14 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11179 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
* upcall: prevent busy loop in reaper threadNiels de Vos2015-06-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | http://review.gluster.org/10342 introduced a cleanup thread for expired client entries. When enabling the 'features.cache-invalidation' volume option, the brick process starts to run in a busy-loop. Obviously this is not intentional, and a process occupying 100% of the cycles on a CPU or core is not wanted. Cherry picked from commit a367d4c6965e1f0da36f17ab6c5fdbd37925ebdd)\: > Change-Id: I453c612d72001f4d8bbecdd5ac07aaed75b43914 > BUG: 1200267 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/11198 > Reviewed-by: soumya k <skoduri@redhat.com> > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> Change-Id: I453c612d72001f4d8bbecdd5ac07aaed75b43914 BUG: 1231516 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11211 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: soumya k <skoduri@redhat.com>
* protocol/server : port log messages to a new frameworkManikandan Selvaganesh2015-06-148-295/+1203
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/9874/ Cherry picked from dc089a1a51988c2b407040e1684d7b0adbd79556 > Change-Id: I7901f55d06716161cc31d2b79a600a16b5ec2ef8 > BUG: 1194640 > Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> > Reviewed-on: http://review.gluster.org/9874 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I7901f55d06716161cc31d2b79a600a16b5ec2ef8 BUG: 1217722 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/10552 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* nfs.c nfs3.c: port log messages to a new frameworkHari Gowtham2015-06-143-375/+585
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/10216/ Cherry picked from 6601aad8380f0f0ccbd4bb9147d8d3584a88da20 > Change-Id: I9ddb90d66d3ad3adb2916c0c949834794ee7bdf3 > BUG: 1194640 > Signed-off-by: Hari Gowtham <hari.gowtham005@gmail.com> > Reviewed-on: http://review.gluster.org/10216 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Niels de Vos <ndevos@redhat.com> Change-Id: I9ddb90d66d3ad3adb2916c0c949834794ee7bdf3 BUG: 1217722 Signed-off-by: Hari Gowtham <hari.gowtham005@gmail.com> Reviewed-on: http://review.gluster.org/11146 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* logging: log "Stale filehandle" on the client as DebugNiels de Vos2015-06-131-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are valid use-cases where a "Stale filehandle" is expected. One of these is deleting a file through NFS-Ganesha. When the "filename" is deleted, Ganesha will stat the file-handle to update its attributes. The file-handle would still be valid in the case where there are hardlinks. There is no need to log "Stale filehandle" as Warning. It is perfectly fine to have this logged as Debug. Cherry picked from commit ec7d0c3de11cbee1470308dcc10ec9f02e7fdfff: > Change-Id: Ib9006d95a5d1f7dd394bf5d5994ad70740ad4ab2 > BUG: 1228731 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/11107 > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: soumya k <skoduri@redhat.com> > Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Change-Id: Ib9006d95a5d1f7dd394bf5d5994ad70740ad4ab2 BUG: 1228729 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11169 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* geo-rep: ignore symlink and harlink errors in geo-repSaravanakumar Arumugam2015-06-131-11/+15
| | | | | | | | | | | | | | Ignore logging in case of symlink and hardlink creation errors, as these are safe errors with respect to geo-replication. Change-Id: I3b863fb03ae23dbea907e4dd9477ff85feecad70 BUG: 1225574 Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-on: http://review.gluster.org/10957 Reviewed-on: http://review.gluster.org/10984 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* features/changelog: Do htime setxattr without XATTR_REPLACE flagKotresh HR2015-06-122-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | HTIME_KEY marks the last changelog rolled over. The xattr is maintained on .glusterfs/changelog/htime/HTIME.TSTAMP file. On every rollover of the changelog file, the xattr is updated. It is being updated with XATTR_REPLACE flag as xattr gets created during changelog enable. But it is once found that the xattrs on the file is cleared and is not reproduced later on. This patch protects that case, if it happens by setting xattr without XATTR_REPLACE flag in failure case. The reason behind doing this in failure case is not to mask the actual cause of xattrs getting cleared. This provides the log message if the original issue still exists but the consequential effects are fixed. Also changed the log messages to depict the events happened during changelog enable. Change-Id: I699ed09a03667fd823d01d65c9c360fa7bc0e455 BUG: 1230694 Reviewed-On: http://review.gluster.org/#/c/11150/ Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/11181 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* geo-rep: Validate use_meta_volume optionAravinda VK2015-06-121-0/+10
| | | | | | | | | | | | Added validation for use_meta_volume option. Change-Id: I64cd9cb4bf383c7267638cab3837fd0cf89071c7 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/#/c/11156/ BUG: 1230691 Reviewed-on: http://review.gluster.org/11180 Reviewed-by: Kotresh HR <khiremat@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* features/qemu-block: Don't unref root inodePranith Kumar K2015-06-121-2/+2
| | | | | | | | | | | | | | | | Backport of http://review.gluster.org/11002 http://review.gluster.org/11076 Root inode doesn't participate in ref/unref. Don't do it in fini as by the time fini is called itable would be destroyed. BUG: 1226272 Change-Id: I776d8e9359c8b51763d9d2588a80311434a0ede3 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11047 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Poornima G <pgurusid@redhat.com>
* features/changelog: Avoid setattr fop logging during renameSaravanakumar Arumugam2015-06-114-23/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When a file is renamed and the (renamed)file's Hashing falls into a different brick, DHT creates a special file(linkto file) in the brick(Hashed subvolume) and carries out setattr operation on that file. Currently, Changelog records this(setattr) operation in Hashed subvolume. glusterfind in turn records this operation as MODIFY operation. So, there is a NEW entry in Cached subvolume and MODIFY entry in Hashed subvolume for the same file. Solution: Avoid logging setattr operation carried out, by marking the operation as internal fop using xdata. In changelog translator, check whether setattr is set as internal fop and skip accordingly. Change-Id: I21b09afb5a638b88a4ccb822442216680b7b74fd BUG: 1230687 Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-on: http://review.gluster.org/11183 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* features/marker : Pass along xdata to lower translatorSachin Pandit2015-06-111-1/+3
| | | | | | | | | | | | | | | | | | The problem was in marker xlator, where during rename a NULL value is passed during STACK_WIND. Marker needs to pass the xdata un-modified to next translator if marker does not rely on that. Change-Id: I9e47e504fd241263987645abfed7ca13c0d54a80 BUG: 1230693 Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/11089 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com> Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/11182 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/quota: Fix ref-leakPranith Kumar K2015-06-111-0/+1
| | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/11045 > Change-Id: I0b44b70f07be441e044d9dfc5c2b64bd5b4cac18 > BUG: 1207735 > Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> > Reviewed-on: http://review.gluster.org/11045 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> > Tested-by: Raghavendra G <rgowdapp@redhat.com> > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: Id740d74fb5cf7a9b23027dbbb0a9f42616dcf2fc BUG: 1229282 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11124 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* stripe: fix use-after-freeJeff Darcy2015-06-101-4/+10
| | | | | | | | | | | | | | | | | | | Pretty much a classic case. STRIPE_STACK_UNWIND frees the "local" structure. In the "virtual xattr" path, used for lock recovery among other things, we were calling STRIPE_STACK_UNWIND and then continuing to clean up "our" parts of the just-freed structure. Oops. Change-Id: Ifa961b89cd21a2893de39a9eea243d184f9eac46 BUG: 1228510 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/11037 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> (cherry picked from commit 62992ac27d729ecc7da500ce42dc46592c13d003) Reviewed-on: http://review.gluster.org/11145 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Upcall/cache-invalidation: Ignore fops with frame->root->client not setSoumya Koduri2015-06-093-7/+24
| | | | | | | | | | | | | | | | | | | Server-side internally generated fops like 'quota/marker' will not have any client associated with the frame. Hence we need a check for clients to be valid before processing for upcall cache invalidation. Also fixed an issue with initializing reaper-thread. Added a testcase to test the fix. Change-Id: If7419b98aca383f4b80711c10fef2e0b32498c57 BUG: 1221941 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/10909 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11141 Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* nfs: allocate and return the hashkey for the auth_cache_entryNiels de Vos2015-06-091-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The allocation of the hashkey was never returned to the calling function. Allocating it with alloca() puts it on the stack, returning from the function makes the pointer invalid. Functions that are annotated with "inline" and call alloca(), will not always be inlined. Returning a pointer allocated with alloca() is in those cases not correct. One such confirmation was provided by GCC developer Alexandre Oliva: - http://gcc.gnu.org/ml/gcc-help/2004-04/msg00158.html It is more correct to call GF_MALLOC() and GF_FREE() for the hashkey. If this would result in preformance hit, we can always think of using alloca() again and turn make_hashkey() into a macro (yuck). Cherry picked from commit b8b59fea7822f9ab1e10d7a3f730354fe82a6097: > Change-Id: Ia86a1f79d33240af4713bfb92f702b0ee6e87eb7 > BUG: 1226714 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/11019 > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> > Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> > Reviewed-by: soumya k <skoduri@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> Change-Id: Ia86a1f79d33240af4713bfb92f702b0ee6e87eb7 BUG: 1227916 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11075 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
* snapshot: Fix finding brick mount path logicAvra Sengupta2015-06-093-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11060/ Previously while finding brick mount paths of snap volume's bricks, we were taking brick order into consideration. This logic fails when a brick is removed or a tier is added. Hence modifying the logic to look for the first occurence of the word "brick" in the brick path. From there we iterate till we find a '/'. The string till the first '/' after we encounter the word brick is the brick mount path. Change-Id: Ic85983c4e975e701cdfd4e13f8e276ac391a3e49 BUG: 1228592 Signed-off-by: Avra Sengupta <asengupt@redhat.com> (cherry picked from commit bf3a6dcdf3c8a8a64e7c864b56c4d9be60fca8e6) Reviewed-on: http://review.gluster.org/11100 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd/snapshot: Return correct errno in events of failure - PATCH 2Avra Sengupta2015-06-0910-92/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/10588/ ENUM RETCODE ERROR ------------------------------------------------------------- EG_INTRNL 30800 Internal Error EG_OPNOTSUP 30801 Gluster Op Not Supported EG_ANOTRANS 30802 Another Transaction in Progress EG_BRCKDWN 30803 One or more brick is down EG_NODEDWN 30804 One or more node is down EG_HRDLMT 30805 Hard Limit is reached EG_NOVOL 30806 Volume does not exist EG_NOSNAP 30807 Snap does not exist EG_RBALRUN 30808 Rebalance is running EG_VOLRUN 30809 Volume is running EG_VOLSTP 30810 Volume is not running EG_VOLEXST 30811 Volume exists EG_SNAPEXST 30812 Snapshot exists EG_ISSNAP 30813 Volume is a snap volume EG_GEOREPRUN 30814 Geo-Replication is running EG_NOTTHINP 30815 Bricks are not thinly provisioned Change-Id: I49a170cdfd77df11fe677e09f4e063d99b159275 BUG: 1226117 Signed-off-by: Avra Sengupta <asengupt@redhat.com> (cherry picked from commit 2df57ab7dc7b9d7deb0eebad96036149760d607b) Reviewed-on: http://review.gluster.org/11042 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* Changing log level from Warning to DebugAshish Pandey2015-06-081-1/+1
| | | | | | | | | | Change-Id: Ie9bf338802e3f1c59c92d2749a1f8bc745dc5455 BUG: 1228100 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/10998 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* features/shard: Handle symlinks appropriately in fopsKrutika Dhananjay2015-06-061-5/+15
| | | | | | | | | | | | | | | Backport of: http://review.gluster.org/10995 (f)stat, unlink and rename must skip doing inode_ctx_get() of shard block size on symbolic links. Change-Id: Iaf2502512a5838db137e5e1f0c14b12f5058865f BUG: 1227572 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/11066 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* cluster/ec: EC_XATTR_DIRTY doesn't come in responsePranith Kumar K2015-06-062-27/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.com/11078 Problem: ec_update_size_version expects all the keys it did xattrop with to come in response so that it can set the values again in ec_update_size_version_done. But EC_XATTR_DIRTY is not combined so the value won't be present in the response. So ctx->post/pre_dirty are not updated in ec_update_size_version_done. So these values are still non-zero. When ec_unlock_now is called as part of flush's unlock phase it again tries to perform same xattrop for EC_XATTR_DIRTY. But ec_update_size_version is not expected to be called in unlock phase of flush because ec_flush_size_version should have reset everything to zero and unlock is never invoked from ec_update_size_version_done for flush/fsync/fsyncdir. This leads to stale lock which leads to hang. Fix: EC_XATTR_DIRTY is removed in ex_xattrop_cbk and is never combined with other answers. So remove handling of this in the response. BUG: 1228160 Change-Id: I657efca6e706e7acb541f98f526943f67562da9f Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11084 Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* worm: Let lock, zero xattrop calls succeedPranith Kumar K2015-06-051-32/+42
| | | | | | | | | | | | | | | | Backport of http://review.gluster.org/10727 Locks can be taken just to inspect the data as well, so allow them. Xattrops are internal fops so we can allow them as well as longs as it doesn't change the xattr value, i.e. All-zero xattrop. BUG: 1225320 Change-Id: I9e72806e0605ab2938348a87935966909f1a721f Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11046 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* bitrot/glusterd: scrub option should be disabled once bitrot option is resetGaurav Kumar Garg2015-06-052-0/+8
| | | | | | | | | | | | | | | | Scrubber options should be disabled from the dictionary if user reset bitrot option. Change-Id: Ic7e390cf88b9b749f0ada8bbd4632f4cc0c4aff9 BUG: 1228045 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/10936 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Venky Shankar <vshankar@redhat.com> (cherry picked from commit 79d8916929f7d5b85a09ae9b75eadf945a3e11fb) Reviewed-on: http://review.gluster.org/11079 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd/shared_storage: Provide a volume set option to create and mount the ↵Avra Sengupta2015-06-0511-51/+365
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shared storage Backport of http://review.gluster.org/#/c/10793/ Introducing a global volume set option(cluster.enable-shared-storage) which helps create and set-up the shared storage meta volume. gluster volume set all cluster.enable-shared-storage enable On enabling this option, the system analyzes the number of peers in the cluster, which are currently connected, and chooses three such peers(including the node the command is issued from). From these peers a volume(gluster_shared_storage) is created. Depending on the number of peers available the volume is either a replica 3 volume(if there are 3 connected peers), or a replica 2 volume(if there are 2 connected peers). "/var/run/gluster/ss_brick" serves as the brick path on each node for the shared storage volume. We also mount the shared storage at "/var/run/gluster/shared_storage" on all the nodes in the cluster as part of enabling this option. If there is only one node in the cluster, or only one node is up then the command will fail Once the volume is created, and mounted the maintainance of the volume like adding-bricks, removing bricks etc., is expected to be the onus of the user. On disabling the option, we provide the user a warning, and on affirmation from the user we stop the shared storage volume, and unmount it from all the nodes in the cluster. gluster volume set all cluster.enable-shared-storage disable Change-Id: Idd92d67b93f444244f99ede9f634ef18d2945dbc BUG: 1228181 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11086 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* dht: Add lookup-optimize configuration option for DHTShyam2015-06-055-16/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently with commit 4eaaf5 a mixed version cluster would have issues if lookup-uhashed is set to auto, as older clients would fail to validate the layouts if newer clients (i.e 3.7 or upwards) create directories. Also, in a mixed version cluster rebalance daemon would set commit hash for some subvolumes and not for the others. This commit fixes this problem by moving the enabling of the functionality introduced in the above mentioned commit to a new dht option. This option also has a op_version of 3_7_1 thereby preventing it from being set in a mixed version cluster. It brings in the following changes, - Option can be set only if min version of the cluster is 3.7.1 or more - Rebalance and mkdir update the layout with the commit hashes only if this option is set, hence ensuring rebalance works in a mixed version cluster, and also directories created by newer clients do not cause layout errors when read by older clients - This option also supersedes lookup-unhased, to enable the optimization for lookups more deterministic and not conflict with lookup-unhashed settings. Option added is cluster.lookup-optimize, which is a boolean. Usage: # gluster volume set VOLNAME cluster.lookup-optimize on Change-Id: Ifd1d4ce3f6438fcbcd60ffbfdbfb647355ea1ae0 BUG: 1225940 Signed-off-by: Shyam <srangana@redhat.com> Reviewed-on: http://review.gluster.org/10976 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* fuse: squash 64-bit inodes in readdirp when enable-ino32 is setNiels de Vos2015-06-043-4/+9
| | | | | | | | | | | | | | | | | | | The structures returned by readdirp contain the inode 2x. Only one of them was squashed into 32-bits when enable-ino32 is enabled. Backport of: > Change-Id: I33a6d28fb118bb23971f918ffeb983d7f033106e > BUG: 1223889 > Reviewed-on: http://review.gluster.org/10881 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Tested-by: Cyril Peponnet <cyril@peponnet.fr> [on release-3.5] Change-Id: I33a6d28fb118bb23971f918ffeb983d7f033106e BUG: 1223890 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/10882 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* glusterd: do not show pid of brick in volume status if brick is down.Gaurav Kumar Garg2015-06-041-2/+4
| | | | | | | | | | | | | | | | | | | | glusterd is currently showing pid of brick in volume status if brick goes down. It should not show pid of brick if brick is down. Change-Id: I077100d96de381695b338382808bd8c37bf625c7 BUG: 1228065 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/10877 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Nekkunti <anekkunt@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> (cherry picked from commit 1a0d76fa14ee88ce17e017c3ceb311417870e944) Reviewed-on: http://review.gluster.org/11080
* cluster/dht: fix incorrect dst subvol info in inode_ctxNithya Balachandran2015-06-046-68/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stashing additional information in the inode_ctx to help decide whether the migration information is stale, which could happen if a file was migrated several times but FOPs only detected the P1 migration phase. If no FOP detects the P2 phase, the inode ctx1 is never reset. We now save the src subvol as well as the dst subvol in the inode ctx. The src subvol is the subvol on which the FOP was sent when the mig info was set in the inode ctx. This information is considered stale if: 1. The subvol on which the current FOP is sent is the same as the dst subvol in the ctx 2. The subvol on which the current FOP is sent is not the same as the src subvol in the ctx This does not handle the case where the same file might have been renamed such that the src subvol is the same but the dst subvol is different. However, that is unlikely to happen very often. Change-Id: I05a2e9b107ee64750c7ca629aee03b03a02ef75f BUG: 1225809 Signed-off-by: Nithya Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/10967 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* dht/rebalance : Fixed rebalance failureNithya Balachandran2015-06-042-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The rebalance process determines the local subvols for the node it is running on and only acts on files in those subvols. If a dist-rep or dist-disperse volume is created on 2 nodes by dividing the bricks equally across the nodes, one process might determine it has no local_subvols. When trying to update the commit hash, the function attempts to lock all local subvols. On the node with no local_subvols the dht inode lock operation fails, in turn causing the rebalance to fail. In a dist-rep volume with 2 nodes, if brick 0 of each replica set is on node1 and brick 1 is on node2, node2 will find that it has no local subvols. Change-Id: I7d73b5b4bf1c822eae6df2e6f79bd6a1606f4d1c BUG: 1221656 Signed-off-by: Nithya Balachandran <nbalacha@redhat.com> Reviewed-on-master: http://review.gluster.org/10786 Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/10788 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* cluster/dht: Fix dht_setxattr to follow files under migrationNithya Balachandran2015-06-043-29/+458
| | | | | | | | | | | | | | | | If a file is under migration, then any xattrs created on it are lost post migration of the file. This is because the xattrs are set only on the cached subvol of the source and as the source is under migration, it becomes a linkto file post migration. Change-Id: Ib8e233b519cf954e7723c6e26b38fa8f9b8c85c0 BUG: 1225839 Signed-off-by: Nithya Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/10968 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* meta: implement fsync(dir)Raghavendra G2015-06-042-16/+40
| | | | | | | | | Change-Id: I707c608a9803fe6ef86860ca5578d4d3f63fd2aa BUG: 1225859 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/10970 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* quota: retry connecting to quotad on ENOTCONN errorvmallika2015-06-043-25/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/10230/ > Suppose if there are two volumes vol1 and vol2, > and quota is enabled and limit is set on vol1. > Now if IO is happening on vol1 and quota is enabled/disabled > on vol2, quotad gets restarted and client will receive > ENOTCONN in the IO path of vol1. > > This patch will retry connecting to quotad upto 60sec > in a interval of 5sec (12 retries) > If not able to connect with 12 retries, then return ENOTCONN > > Change-Id: Ie7f5d108633ec68ba9cc3a6a61d79680485193e8 > BUG: 1211220 > Signed-off-by: vmallika <vmallika@redhat.com> > Reviewed-on: http://review.gluster.org/10230 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> > Tested-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I94d8d4a814a73d69e934f3e77e989e5f3bf2e65a BUG: 1226789 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11024 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: prevent statfs frame loss when an error happens during ancestryvmallika2015-06-041-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | building This is a backport of http://review.gluster.org/#/c/9380/ > We do quota_build_ancestry in function 'quota_get_limit_dir', > suppose if quota_build_ancestry fails, then we don't have a > frame saved to continue the statfs FOP and client can hang. > > Change-Id: I92e25c1510d09444b9d4810afdb6b2a69dcd92c0 > BUG: 1178619 > Signed-off-by: Raghavendra G <rgowdapp@redhat.com> > Signed-off-by: vmallika <vmallika@redhat.com> > Reviewed-on: http://review.gluster.org/9380 > Tested-by: Gluster Build System <jenkins@build.gluster.com> Change-Id: I998f417d62d6ea4f57f237f547243d44c2da438c BUG: 1226792 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11025 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* features/quota : Make "quota-deem-statfs" option "on" by default, when quota ↵Sachin Pandit2015-06-041-0/+9
| | | | | | | | | | | | | | | | | | | is enabled As of now it is expected from user to set deem-statfs to "on" when quota is enabled. Better to turn it "on" by default when quota is enabled. Change-Id: I85e0b919b1bdb74ac21e256073eebcb55bcb8e2a BUG: 1226224 Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/10299 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com> Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/11000 Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* cluster/dht: pass a destination subvol to fop2 variants to avoid races.Raghavendra G2015-06-045-134/+193
| | | | | | | | | | | | | | | | | | The destination subvol used in the fop2 variants is either stored in inode-ctx1 or local->cached_subvol. However, it is not guaranteed that a value stored in these locations before invocation of fop2 is still present after the invocation as these locations are shared among different concurrent operations. So, to preserve the atomicity of "check dst-subvol and invoke fop2 variant if dst-subvol found", we pass down the dst-subvol to fop2 variant. This patch also fixes error handling in some fop2 variants. Change-Id: Icc226228a246d3f223e3463519736c4495b364d2 BUG: 1225809 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/10966 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/dht: Don't rely on linkto xattr to find destination subvolRaghavendra G2015-06-031-101/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | during phase 2 of migration. linkto xattr on source file cannot be relied to find where the data file currently resides. This can happen if there are multiple migrations before phase 2 detection by a client. For eg., * migration (M1, node1, node2) starts. * application writes some data. DHT correctly stores the state in inode context that phase-1 of migration is in progress * migration M1 completes * migration (M2, node2, node3) is triggered and completed * application resumes writes to the file. DHT identifies it as phase-2 of migration. However, linkto xattr on node1 points to node2, but the file is on node3. A lookup correctly identifies node3 as cached subvol TBD: When we identify phase-2 of a previous migration (say M1), there might be a migration in progress - say (M3, node3, node4). In this case we need to send writes to both (node3, node4) not just node3. Also, the inode state needs to correctly indicate that its in phase-1 of migration. I'll send this as a different patch. Change-Id: I1a861f766258170af2f6c0935468edb6be687b95 BUG: 1225809 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/10805 Reviewed-on: http://review.gluster.org/10965 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* afr: honour selfheal enable/disable volume set optionsRavishankar N2015-06-032-3/+11
| | | | | | | | | | | | | | | | | | | | | | | afr-v1 had the following volume set options that are used to enable/ disable self-heals from happening in AFR xlator when loaded in the client graph: cluster.metadata-self-heal cluster.data-self-heal cluster.entry-self-heal In afr-v2, these 3 heals can happen from the client if there is an inode refresh. This patch allows such heals to proceed only if the corresponding volume set options are set to true. Change-Id: I8d97d6020611152e73a269f3fdb607652c66cc86 BUG: 1227674 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/11012 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> (cherry picked from commit da111ae21429d33179cd11409bc171fae9d55194) Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/11062