scoutfs: remove warning on reading while staging

An incorrect warning condition was added as fallocate was implemented.
It tried to warn against trying to read from the staging ioctl.  But the
staging boolean is set on the inode when the staging ioctl has the inode
mutex.  It protects against writes, but page reading doesn't use the
mutex.  It's perfectly acceptable for reads to be attempted while the
staging ioctl is busy.  We rely on it for a large read to consume
staging being written.

The warning caused reads to fail while the stager ioctl was working.
Typically this would hit read-ahead and just force sync reads.  But it
could hit sync reads and cause EIO.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2020-04-10 11:15:24 -07:00
committed by Zach Brown
parent 192453e717
commit 66f8b3814c

View File

@@ -1017,8 +1017,7 @@ static int scoutfs_get_block(struct inode *inode, sector_t iblock,
/* make sure caller holds a cluster lock */
lock = scoutfs_per_task_get(&si->pt_data_lock);
if (WARN_ON_ONCE(!lock) ||
WARN_ON_ONCE(!create && si->staging)) {
if (WARN_ON_ONCE(!lock)) {
ret = -EINVAL;
goto out;
}