Hide Forgot
Afr needs to acquire the following entry locks (on all replica subvols) when, - "rmdir (pathname=dirname/basename)" is issued on a replicated volume. entrylk (dirname, basename) and entrylk (pathname, NULL) in that order. - "rename (src=sdirname/sbasename, dst=ddirname/dbasename)" is issued on a replicated volume. Note: here dst is a directory. entrylk (sdirname, sbasename), entrylk (ddirname, dbasename) in a deterministic order. Subsequently an entrylk (dst, NULL) - To ensure 'dst' remains empty all through the rename operation.
Saw the issue happening at this head: 5303f98f674ab5cb600dde0394ff7ddd5ba3c98a for a distributed-replicate volume with 6 bricks[3x2] Steps: 1. untarred openssl & did ./config && make && make test on the mount point 2. did replace brick from 1 brick to a fresh brick. 3. While the replace brick was migrating the openssl directory, did an rm -rf on the openssl directory. Result: rm failed saying that openssl/apps & openssl/crypto is not empty. From the mountpoint, the files inside those directories were empty, but at the backend, the destination brick after the migrate brick operation, has a file each in both the directories, which have gfid. But its still not visible from the mountpoint & hence rm fails on the directories.
http://review.gluster.org/2828 posted for review
CHANGE: http://review.gluster.org/2828 (afr: Modified book-keeping structures for entrylks) merged in master by Anand Avati (avati)
CHANGE: http://review.gluster.org/4433 (replicate: fix lock counting in blocking lock path) merged in master by Anand Avati (avati)
CHANGE: http://review.gluster.org/4436 (cluster/afr: before checking lock_count of internal lock make sure its not entrylk) merged in master by Anand Avati (avati)
CHANGE: http://review.gluster.org/4442 (bug-765564.t: fix path for file to rename) merged in master by Anand Avati (avati)
CHANGE: http://review.gluster.org/4438 (cluster/afr: if a subvolume is down wind the lock request to next) merged in master by Anand Avati (avati)
CHANGE: http://review.gluster.org/4480 (afr: serialize modification of {entrylk,inodelk}_lock_count) merged in master by Anand Avati (avati)