mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-07 04:26:29 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user