io-cache: prevent frames from getting woken up while page is getting validated
io-cache: prevent frames from getting woken up while page is getting validated

1. A page will be put on the inode waitq if the 'freshness' has to be verified with an fstat()

2. while the fstat is in transit, other calls (like lookup) can update ioc_inode->tv, resetting the freshness (page still on inode waitq)

3. Another read request on the same page, after the updated freshness, will wake up the page frames neglecting the fact that the page is also waiting on the inode (waiting for the fstat completion)

4. once the page's frames are woken, the page becomes elegible for purging and can get destroyed for various reasons, leaving a destroyed page pointer in the inode's waitq

5. fstat returns and hits the destroyed page pointer causing a crash

The fix is to all together disable cache hits when any page of the same inode is under validation. The otherwise cache hit will now be subjected to the ongoing validation by getting queued to the inode waitq.

Signed-off-by: Anand V. Avati <6a1810c170bd423868ce2e225ecea39d80cade0f@dev.gluster.com>

Kaushikbv/Gluster,Kaushikbv/Gluster,Kaushikbv/Gluster