summaryrefslogtreecommitdiffstats
path: root/xlators
Commit message (Collapse)AuthorAgeFilesLines
* posix: disable open/read/write on special filesAmar Tumballi2018-09-061-0/+33
| | | | | | | | | | | | | | | | | | | In the file system, the responsibility w.r.to the block and char device files is related to only support for 'creating' them (using mknod(2)). Once the device files are created, the read/write syscalls for the specific devices are handled by the device driver registered for the specific major number, and depending on the minor number, it knows where to read from. Hence, we are at risk of reading contents from devices which are handled by the host kernel on server nodes. By disabling open/read/write on the device file, we would be safe with the bypass one can achieve from client side (using gfapi) Fixes: bz#1625096 Change-Id: I48c776b0af1cbd2a5240862826d3d8918601e47f Signed-off-by: Amar Tumballi <amarts@redhat.com>
* protocol: don't use allocaAmar Tumballi2018-09-062-103/+58
| | | | | | | | | | | | current implementation of alloca can cause issues when strings larger than the allocated buffer is passed to the xdr. Hence it makes sense to allow XDR decode functions to deal with memory allocations, which we can free later. Fixes: bz#1625097 Change-Id: I3a05553f5702de9575c244649ca0e5ac9abaac94 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* io-stats: dump io-stats info in /var/run/glusterAmar Tumballi2018-09-061-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | It wouldn't make sense to allow iostats file to be written in *any* directory. While the formating makes sure we try to append io-stats-name for the file, so overwriting existing file is slim, but in any case it makes sense to restrict dumping to one directory. Below are the sample commands, and files created for the corresponding values: $ setfattr -n trusted.io-stats-dump -v file-for-dump $M0 In this case, the file would be in /var/run/gluster/file-for-dump $ setfattr -n trusted.io-stats-dump -v /dir1/dir2/file-for-dump $M0 In this case, then the dump file is in /var/run/gluster/dir1-dir2-file-for-dump Note that the value passed for this virtual xattr would be treated as a file, and even if the value has '/' in it, it would be changed to '-' for sanity. Fixes: bz#1625106 Change-Id: Id9ae6a40a190b8937c51662e6e1c2a0f6c86a0e0 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* server-protocol: don't allow '../' path in 'name'Amar Tumballi2018-09-062-0/+18
| | | | | | | | | | | | | This will prevent any arbitrary file creation through glusterfs by modifying the client bits. Also check for the similar flaw inside posix too, so we prevent any changes in layers in-between. Fixes: bz#1625095 Signed-off-by: Amar Tumballi <amarts@redhat.com> Change-Id: Id9fe0ef6e86459e8ed85ab947d977f058c5ae06e
* posix: remove not supported get/set contentAmar Tumballi2018-09-063-186/+1
| | | | | | | | | | | | | | | | getting and setting a file's content using extended attribute worked great as a GET/PUT alternative when an object storage is supported on top of Gluster. But it needs application changes, and also, it skips some caching layers. It is not used over years, and not supported any more. Removing the dead code. Fixes: bz#1625102 Change-Id: Ide3b3f1f644f6ca58558bbe45561f346f96b95b7 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* storage/posix: Increment trusted.pgfid in posix_mknodN Balachandran2018-08-291-4/+14
| | | | | | | | | | The value of trusted.pgfid.xx was always set to 1 in posix_mknod. This is incorrect if posix_mknod calls posix_create_link_if_gfid_exists. Change-Id: Ibe87ca6f155846b9a7c7abbfb1eb8b6a99a5eb68 fixes: bz#1623317 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* dht: Delete MDS internal xattr from dict in dht_getxattr_cbkMohit Agrawal2018-08-162-31/+4
| | | | | | | | | | | | | | | | | | Problem: At the time of fetching xattr to heal xattr by afr it is not able to fetch xattr because posix_getxattr has a check to ignore if xattr name is MDS Solution: To ignore same xattr update a check in dht_getxattr_cbk instead of having a check in posix_getxattr Backport of: > BUG: 1584098 > Change-Id: I86cd2b2ee08488cb6c12f407694219d57c5361dc > Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Change-Id: I86cd2b2ee08488cb6c12f407694219d57c5361dc fixes: bz#1611116 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* geo-rep : fix possible crashSunny Kumar2018-08-161-2/+5
| | | | | | | | | | | | | | | | | Problem : In 'glusterd_verify_slave' while tokenizing error message we call 'strtok_r' and store return value in 'tmp' which can be NULL. We are passing this 'tmp' as 1st argument to 'strcmp' which will lead to segmentation fault. Solution : before calling 'strcmp' we should NULL check 'tmp'. Backport of: > Change-Id: Ifd3864b904afe6cd09d9e5a4b55c6d0578e22b9d > BUG: 1602121 > Signed-off-by: Sunny Kumar <sunkumar@redhat.com> Change-Id: Ifd3864b904afe6cd09d9e5a4b55c6d0578e22b9d fixes: bz#1611115 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* glusterd: memory leak in geo-rep statusSanju Rakonde2018-08-161-2/+6
| | | | | | | | | | | Backport of: > BUG: 1580352 > Change-Id: I9648e73090f5a2edbac663a6fb49acdb702cdc49 > Signed-off-by: Sanju Rakonde <srakonde@redhat.com> fixes: bz#1611110 Change-Id: I9648e73090f5a2edbac663a6fb49acdb702cdc49 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* glusterd/geo-rep: Fix glusterd crashKotresh HR2018-08-151-1/+1
| | | | | | | | | | | | | | | | | Using strdump instead of gf_strdup crashes during free if mempool is being used. gf_free checks the magic number in the header which will not be taken care if strdup is used. Backport of: > BUG: 1576392 > Change-Id: Iab36496554b838a036af9d863e3f5fd07fd9780e > Signed-off-by: Kotresh HR <khiremat@redhat.com> fixes: bz#1611106 Change-Id: Iab36496554b838a036af9d863e3f5fd07fd9780e Signed-off-by: Kotresh HR <khiremat@redhat.com>
* storage/posix: Fix excessive logging in WRITE fop pathKrutika Dhananjay2018-08-101-0/+3
| | | | | | | | | | | | | | | Backport of: https://review.gluster.org/#/c/glusterfs/+/20250 I was running some write-intensive tests on my volume, and in a matter of 2 hrs, the 50GB space in my root partition was exhausted. On inspecting further, figured that excessive logging in bricks was the cause - specifically in posix write when posix_check_internal_writes() does dict_get() without a NULL-check on xdata. Change-Id: I89de57a3a90ca5c375e5b9477801a9e5ff018bbf fixes: bz#1596686 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> (cherry picked from commit 81701e4d92ae7b1d97e5bc955703719f2e9e773a)
* glusterd: _is_prefix should handle 0-length pathsKaushal M2018-07-241-0/+9
| | | | | | | | | If one of the paths given to _is_prefix is 0-length, then it is not a prefix of the other. Hence, _is_prefix should return false. Change-Id: I54aa577a64a58940ec91872d0d74dc19cff9106d fixes: bz#1599785 Signed-off-by: Kaushal M <kaushal@redhat.com>
* afr: switch lk_owner only when pre-op succeedsRavishankar N2018-07-232-15/+10
| | | | | | | | | | | | | | | | | | | | Problem: In a disk full scenario, we take a failure path in afr_transaction_perform_fop() and go to unlock phase. But we change the lk-owner before that, causing unlock to fail. When mount issues another fop that takes locks on that file, it hangs. Fix: Change lk-owner only when we are about to perform the fop phase. Also fix the same issue for arbiters when afr_txn_arbitrate_fop() fails the fop. Also removed the DISK_SPACE_CHECK_AND_GOTO in posix_xattrop. Otherwise truncate to zero will fail pre-op phase with ENOSPC when the user is actually trying to freee up space. Change-Id: Ic4c8a596b4cdf4a7fc189bf00b561113cf114353 fixes: bz#1603056 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit ec0d7d77de3e4bd485a4fa2e53c9137e25c71ce7)
* posix: check before removing stale symlinkRavishankar N2018-07-231-4/+8
| | | | | | | | | | | | | | | BZ 1564071 complains of directories with missing gfid symlinks and corresponding "Found stale gfid handle" messages in the logs. Hence add a check to see if the symlink points to an actual directory before removing it. Note: Removing stale symlinks was added via commit 3e9a9c029fac359477fb26d9cc7803749ba038b2 Change-Id: I5d91fab8e5f3a621a9ecad4a1f9c898a3c2d346a Updates: bz#1603099 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit 9ab218be5e69b9f71fe4eea9ca8d114b78cafd25)
* cluster/afr: Prevent execution of code after call_count decrementingPranith Kumar K2018-07-101-7/+8
| | | | | | | | | | | | | | | Problem: When call_count is decremented by one thread, another thread can go ahead with the operation leading to undefined behavior for the thread executing statements after decrementing call count. Fix: Do the operations necessary before decrementing call count. fixes bz#1599629 Change-Id: Icc90cd92ac16e5fbdfe534d9f0a61312943393fe Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> (cherry picked from commit 03f1f5bdc46076178f1afdf8e2a76c5b973fe11f)
* afr: heal gfids when file is not present on all bricksRavishankar N2018-07-095-12/+51
| | | | | | | | | | | | commit 20fa80057eb430fd72b4fa31b9b65598b8ec1265 introduced a regression wherein if a file is present in only 1 brick of replica *and* doesn't have a gfid associated with it, it doesn't get healed upon the next lookup from the client. Fix it. Change-Id: I7d1111dcb45b1b8b8340a7d02558f05df70aa599 fixes: bz#1597117 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit eb472d82a083883335bc494b87ea175ac43471ff)
* cluster/afr: Make sure lk-owner is assigned at the time of lockPranith Kumar K2018-07-041-2/+1
| | | | | | | | | | | | | | | Problem: In the new eager-lock implementation lk-owner is assigned after the 'local' is added to the eager-lock list, so there exists a possibility of lock being sent even before lk-owner is assigned. Fix: Make sure to assign lk-owner before adding local to eager-lock list fixes bz#1598193 Change-Id: I26d1b7bcf3e8b22531f1dc0b952cae2d92889ef2 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> (cherry picked from commit c6f93e422855f656d3a86461a8458f37ad0103eb)
* posix/ctime: Fix differential ctime duing entry operationsKotresh HR2018-07-021-51/+60
| | | | | | | | | | | | | | | | | | | | | | | | We should not be relying on backend file's time attributes to load the initial ctime time attribute structure. This is incorrect as each replica set would have witnessed the file creation at different times. For new file creation, ctime, atime and mtime should be same, hence initiate the ctime structure with the time from the frame. But for the files which were created before ctime feature is enabled, this is not accurate but still fine as the times would get eventually accurate. Backport of: > Patch: https://review.gluster.org/#/c/20281/ > BUG: 1592275 > Change-Id: I206a469c83ee7b26da2fe096ae7bf8ff5986ad67 > Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 841991130c94e3fcf4076917be6da9ce90406932) fixes: bz#1593537 Change-Id: I206a469c83ee7b26da2fe096ae7bf8ff5986ad67 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* afr: don't update readables if inode refresh failed on all childrenRavishankar N2018-07-024-32/+50
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: If inode refresh failed on all children of afr due to ENOENT (say file migrated by dht), it resets the readables to zero. Any inflight txn which then later comes on the inode fails with EIO because no readable children present for the inode. Fix: Don't update readables when inode refresh fails on *all* children of afr. In that way any inflight txns will either proceed with its own inode refresh if needed and fail it with the right errno or use the old value of readables and continue with the txn. Also, add quorum checks to the beginning of afr_transaction(). Otherwise, we seem to be winding the lock and checking for quorum only in pre-op pahse. Note: This should ideally fix BZ 1329505 since the stop gap fix for it is has been reverted at https://review.gluster.org/#/c/20028. Change-Id: Ia638c092d8d12dc27afb3cdad133394845061319 updates: bz#1597116 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit 0f13eed0c1fa74cefed486538b02e0c8a8708456)
* ctime: Fix self heal of symlink in EC volumeKotresh HR2018-07-025-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since IEEE Std 1003.1-2001 does not require any association of file times with symbolic links, there is no requirement that file times be updated by readlink() states [1]. stat on symlink file was generating a readlink fop on one of the subvolumes of ec set which in turn updates atime on that subvolume. This causes mdata xattr to be different across ec set and hence self heal fails. So based on [1], atime is no longer updated by readlink fop. [1] http://pubs.opengroup.org/onlinepubs/009695399/functions/readlink.html Backport of: > Patch: https://review.gluster.org/#/c/20311/ > BUG: 1592509 > Change-Id: I08bd3ca3bdb222bd18160b1aa58fc2f7630c8083 > Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit c097a7894d458e33a41f6db6092677108ef30fec) fixes: bz#1593536 Change-Id: I08bd3ca3bdb222bd18160b1aa58fc2f7630c8083 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit c097a7894d458e33a41f6db6092677108ef30fec)
* storage/posix: Fix posix_symlinks_match()Pranith Kumar K2018-07-021-3/+13
| | | | | | | | | | | 1) snprintf into linkname_expected should happen with PATH_MAX 2) comparison should happen with linkname_actual with complete string linkname_expected fixes bz#1595524 Change-Id: Ic3b3c362dc6c69c046b9a13e031989be47ecff14 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> (cherry picked from commit 3099d3e6ba81d3e1abf37385b13aabf5837b9c5e)
* glusterfs: access trusted peer group via remote-host commandMohit Agrawal2018-06-251-5/+0
| | | | | | | | | | | | | | | | Problem: In SSL environment the user is able to access volume via remote-host command without adding node in a trusted pool Solution: Change the list of rpc program in glusterd.c at the time of initialization while SSL is enabled > Change-Id: I987e433b639e68ad17b77b6452df1e22dbe0f199 > cherry picked from commit 234d611160840899bcfd5ab1c17a6253673d38ed BUG: 1593525 fixes: bz#1593525 Change-Id: Ice4eda3d8104a4d5641de3cffd7249e46080d48f Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* storage/posix: Handle ENOSPC correctly in zero_fillPranith Kumar K2018-06-141-1/+22
| | | | | | | Change-Id: Icc521d86cc510f88b67d334b346095713899087a fixes: bz#1591185 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> (cherry picked from commit 6ef91480f9e75f63100585bfd19694deb0c2457b)
* protocol/server: Fix xdata leak in seek fopPranith Kumar K2018-06-121-2/+1
| | | | | | | Change-Id: I6125283ed22c04564f0b77bb7a50579a83e02eb0 fixes: bz#1590128 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> (cherry picked from commit fd5b48ea0afd907deb08604415bee14ab65f378b)
* posix/ctime: Fix fops racing in updating mtime/atimeKotresh HR2018-06-081-11/+31
| | | | | | | | | | | | | | | | | | | | | | | | In distributed systems, there could be races with fops updating mtime/atime which could result in different mtime/atime for same file. So updating them only if time is greater than the existing makes sure, only the highest time is retained. If the mtime/atime update comes from the explicit utime syscall, it is allowed to set to previous time. Thanks Xavi for helping in rooting the issue. Backport of: > Patch: https://review.gluster.org/#/c/20120/ > BUG: 1584981 > Change-Id: If1230a75b96d7f9a828795189fcc699049e7826e > Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit a6f0e7a4f1ca203762cae2ed5e426b52124c74dc) fixes: bz#1585894 Change-Id: If1230a75b96d7f9a828795189fcc699049e7826e Signed-off-by: Kotresh HR <khiremat@redhat.com>
* features/shard: Fix missing unlock in shard_fsync_shards_cbk()Vijay Bellur2018-06-061-0/+1
| | | | | | | | | | | | | Backport of: > Change-Id: I745a98e957cf3c6ba69247fcf6b58dd05cf59c3c > Signed-off-by: Vijay Bellur <vbellur@redhat.com> > (cherry picked from commit b21f742f96d46b4adfa87281dd9a2e48fea8d031) > BUG: 789278 Change-Id: I745a98e957cf3c6ba69247fcf6b58dd05cf59c3c fixes: bz#1587908 Signed-off-by: Vijay Bellur <vbellur@redhat.com> (cherry picked from commit b21f742f96d46b4adfa87281dd9a2e48fea8d031)
* protocol/client: Don't send fops till SETVOLUME is completev4.1.0rc0Raghavendra G2018-05-312-3/+9
| | | | | | | | | | | | | | | | | | An earlier commit set conf->connected just after rpc layer sends RPC_CLNT_CONNECT event. However, success of socket level connection connection doesn't indicate brick stack is ready to receive fops, as an handshake has to be done b/w client and server after RPC_CLNT_CONNECT event. Any fop sent to brick in the window between, * protocol/client receiving RPC_CLNT_CONNECT event * protocol/client receiving a successful setvolume response can end up accessing an uninitialized brick stack. So, set conf->connected only after a successful SETVOLUME. Change-Id: I139a03d2da6b0d95a0d68391fcf54b00e749decf fixes: bz#1584633 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> (cherry picked from commit 430e4872db43447c8a15b638760d23c188257139)
* cluster/dht: Fix rebalance log msgN Balachandran2018-05-311-2/+2
| | | | | | | | | | Corrected the name of the xattr and fixed the code to log an error only if op_errno is not ENODATA or ENOATTR. Change-Id: I42c5b1d838eec586ac7bed2471eb1d27ff09a9ea fixes: bz#1583769 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* posix/ctime: Fix updating mtime to older timeKotresh HR2018-05-251-5/+11
| | | | | | | | | | | | | | | | | | With ctime feature enabled, the mtime is not updated when it's set to time older than the existing one. Fixed the same. But the ctime is not allowed to change to older dates. Backport of: > Patch: https://review.gluster.org/#/c/20055/ > BUG: 1581035 > Change-Id: If520922df42d6ce084c8df3046c138f8367164e5 (cherry picked from commit e9e3699456e738635685c9f42d1c4206c6177510) fixes: bz#1582531 Change-Id: If520922df42d6ce084c8df3046c138f8367164e5 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit e9e3699456e738635685c9f42d1c4206c6177510)
* afr: fix bug-1363721.t failureRavishankar N2018-05-253-0/+55
| | | | | | | | | | | | | | | | | | | | | | | Problem: In the .t, when the only good brick was brought down, writes on the fd were still succeeding on the bad bricks. The inflight split-brain check was marking the write as failure but since the write succeeded on all the bad bricks, afr_txn_nothing_failed() was set to true and we were unwinding writev with success to DHT and then catching the failure in post-op in the background. Fix: Don't wind the FOP phase if the write_subvol (which is populated with readable subvols obtained in pre-op cbk) does not have at least 1 good brick which was up when the transaction started. Note: This fix is not related to brick muliplexing. I ran the .t 10 times with this fix and brick-mux enabled without any failures. Change-Id: I915c9c366aa32cd342b1565827ca2d83cb02ae85 updates: bz#1581548 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit 985a1d15db910e012ddc1dcdc2e333cc28a9968b)
* cluster/ec: Fix pre-op xattrop managementXavi Hernandez2018-05-253-32/+66
| | | | | | | | | | | | | | | | | | | | | | | Multiple pre-op xattrop can be simultaneously being processed. On the cbk it was checked if the fop was waiting for some specific data (like size and version) and, if so, it was assumed that this answer should contain that data. This is not true, since a fop can be waiting for some data, but it may come from the xattrop of another fop. This patch differentiates between needing some information and providing it. This is related to parallel writes. Disabling them fixed the problem, but also prevented concurrent reads. A change has been made so that disabling parallel writes still allows parallel reads. Backport of: > BUG: 1578325 Fixes: bz#1582056 Change-Id: I74772ad6b80b7b37805da93d5ec3ae099e96b041 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* storage/posix: use proper FOP for unwinding readdir(p)Raghavendra Bhat2018-05-251-3/+8
| | | | | | | | | | As of now, even for readdirp, posix is unwinding with readdir signature. Change-Id: I6440c8a253c5d78bbcc97043e4e6e208e3d47cd1 fixes: bz#1582199 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> (cherry picked from commit de9b8c06b89b6129154693f048985554ccc5a7e7)
* Revert "glusterfsd: Memleak in glusterfsd process while brick mux is on"Mohit Agrawal2018-05-2523-207/+126
| | | | | | | Updates: bz#1582286 This reverts commit 7c3cc485054e4ede1efb358552135b432fb7047a. Change-Id: I831d646112bcfa13d0c2153482ad00ff1b23aa6c Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* Revert "gluster: Sometimes Brick process is crashed at the time of stopping ↵Mohit Agrawal2018-05-259-190/+61
| | | | | | | | brick" Updates: bz#1582286 This reverts commit 0043c63f70776444f69667a4ef9596217ecb42b7. Change-Id: Iab3b4f4a54e122c589e515add93c6effc966b3e0
* Revert "server: fix unresolved symbols by moving them to libglusterfs"Mohit Agrawal2018-05-251-1/+1
| | | | | | Updates: bz#1582286 This reverts commit 408a6d07ababde234ddeafe16687aacd2b810b42. Change-Id: If8247d7980d698141f47130a3c532b942408ec2b
* posix/ctime: Fix gfid heal on first lookupKotresh HR2018-05-243-27/+62
| | | | | | | | | | | | | | | | | | | | | With ctime feature enabled, the gfid is not healing on first lookup. The fresh file logic depends on ctime and it was fetching from backend instead of xattr with ctime feature enabled. Fixed the same. Also fixed a possible hang with inode lock Backport of: > Patch: https://review.gluster.org/20052 > BUG: 1580532 > Change-Id: I020875c0462b284d6fa0e68304a422fa3d6a3e73 > Signed-off-by: Kotresh HR <khiremat@redhat.com> fixes: bz#1582080 Change-Id: I020875c0462b284d6fa0e68304a422fa3d6a3e73 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* posix/ctime: Fix atime update for hardlinkKotresh HR2018-05-241-8/+19
| | | | | | | | | | | | | | | | | | | With ctime feature enabled, atime is not being updated for a hardlink when the file is accessed. e.g., touch -a <hardlink_file> fails to update atime. This patch fixes the same. Backport of: > Patch: https://review.gluster.org/20051 > BUG: 1580529 > Change-Id: I2201c88d502d0070300a1f5023af1b36951284ec > Signed-off-by: Kotresh HR <khiremat@redhat.com> fixes: bz#1582072 Change-Id: I2201c88d502d0070300a1f5023af1b36951284ec Signed-off-by: Kotresh HR <khiremat@redhat.com>
* ctime: Fix updating ctime in rename and unlinkKotresh HR2018-05-243-13/+31
| | | | | | | | | | | | | | | | | 1. Successful rename was not updating ctime. Fixed the same. 2. Successful unlink when link count is more than 1 was not updating ctime. Fixed the same. 3. Copy ctime and flags during frame copy. Backport of: > Patch: https://review.gluster.org/20039 > BUG: 1580020 > Change-Id: Ied47275a36aea60254b2add7a59128a9c83b3645 fixes: bz#1582068 Change-Id: Ied47275a36aea60254b2add7a59128a9c83b3645 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* make posix return errors when gfid2path key is absentRaghavendra Bhat2018-05-223-23/+42
| | | | | | | Change-Id: I3a8d452d00560dac5e0b7ff0b1835d1f20a59f91 updates: bz#1580540 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> (cherry picked from commit c2cf3f686f3ea0efd936d2eafc404fc9d2e0acc7)
* cluster/dht: Remove EIO from dht_inode_missingN Balachandran2018-05-222-4/+2
| | | | | | | | | | | Removed EIO from the list of errnos that triggered a migrate check task. (cherry picked from commit c925962b91c67c8cd2391df7dd0251e0cbf66648) Change-Id: I7f89c7a16056421588f1af2377cebe6affddcb47 fixes: bz#1579674 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* cluster/dht: Debug logs in dht_readdir(p)_cbkN Balachandran2018-05-221-2/+27
| | | | | | | | | | Additional log messages to help debug issues with file listings. (cherry picked from commit d3e3b11d38b927cf849d2d7a20460650963fd438) Change-Id: Iccd07498ba01d597c0c40f026f4177dd06d7e901 fixes: bz#1579736 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* dht: Excessive 'dict is null' logs in dht_discover_completeMohit Agrawal2018-05-221-1/+2
| | | | | | | | | | | | | Problem: In Geo-Rep setup excessive "dict is null" logs in dht_discover_complete while xattr is NULL Solution: To avoid the logs update a condition in dht_discover_complete BUG: 1580215 Change-Id: Ic7aad712d9b6d69b85b76e4fdf2881adb0512237 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* dht: Avoid dict log flooding for internal MDS xattrMohit Agrawal2018-05-221-1/+1
| | | | | | | | | | | | | | Problem: Before populate MDS internal xattr first dht checks if MDS is present in xattr or not.If xattr dictionary is NULL dict_get log the message either dict or key is NULL Solution: Before call dict_get check xattr, if it is NULL then no need to call dict_get. BUG: 1579757 Change-Id: I81604ec5945b85eba14b42f4583d06ec713028f4 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* core: remove experimental xlators and associated testsKaleb S. KEITHLEY2018-05-0950-5757/+2
| | | | | | | | experimental xlators removed from 4.1 Signed-off-by: ShyamsundarR <srangana@redhat.com> Change-Id: I34419ce22ca09b7626b8f9382c377a614fd9fed8 Updates: bz#1575386
* Revert "gfapi: return pre/post attributes from glfs_pread/pwrite"ShyamsundarR2018-05-086-10/+19
| | | | | | | | | | | | | | | | | | This reverts commit d01f7244e9d9f7e3ef84e0ba7b48ef1b1b09d809. This is being reverted as the API signatures should adapt to a statx like structure, and also all APIs that need to return pre/post attrs are not complete. As a result, instead of fixing up part of the APIs and then refixing the same in a later release, removing these set of fixes from the branch Additionally fixed up posix-entry-ops.c which was using the new syncop signature Updates: bz#1575386 Change-Id: I35222dadc4a2e97010bc1e6b97b6f83583c311f6
* Revert "gfapi: return pre/post attributes from glfs_fsync/fdatasync"ShyamsundarR2018-05-083-4/+3
| | | | | | | | | | | | | | | This reverts commit 09943beb499617212f2985ca8ea9ecd1ed1b470e. This is being reverted as the API signatures should adapt to a statx like structure, and also all APIs that need to return pre/post attrs are not complete. As a result, instead of fixing up part of the APIs and then refixing the same in a later release, removing these set of fixes from the branch. Updates: bz#1575386 Change-Id: I3e0803c114dc6b9126d8a90f43812bca501e6338
* Revert "gfapi: return pre/post attributes from glfs_ftruncate"ShyamsundarR2018-05-082-8/+5
| | | | | | | | | | | | | | | | | | This reverts commit 248152767b0599986bbb6bb35fc27197f6be6964. This is being reverted as the API signatures should adapt to a statx like structure, and also all APIs that need to return pre/post attrs are not complete. As a result, instead of fixing up part of the APIs and then refixing the same in a later release, removing these set of fixes from the branch. Additionally fixed up cloudsync.c code that was using the new syncop signature. Updates: bz#1575386 Change-Id: Idb59d20666c0d7b0c83e7fdc31dd68b8c7db9550
* glusterd: Fix for memory leak in volume tier status commandSanju Rakonde2018-05-061-0/+8
| | | | | | Fixes: bz#1573220 Change-Id: Ia60f40fa4f1e525cae6f571a24e5385ba1e004c0 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* glusterd/ctime: Provide option to enable/disable ctime featureKotresh HR2018-05-066-16/+41
| | | | | | Updates: #208 Change-Id: If6f52b9b1b5b823ad64faeed662e96ceb848c54c Signed-off-by: Kotresh HR <khiremat@redhat.com>
* glusterd/utime: glusterd utime changesKotresh HR2018-05-062-0/+21
| | | | | | | | | Load utime xlator in the client side just after (below) performance xlators. Updates: #208 Change-Id: Ie15f156943fa8e7dac7050e5479c906da747b568 Signed-off-by: Kotresh HR <khiremat@redhat.com>