mirror of
https://github.com/versity/scoutfs.git
synced 2025-12-23 13:35:18 +00:00
Set END_IO on allocated segs
A reader that hits an allocated segment would wait on IO forever. Setting the end_io bit lets readers use written segments. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -232,6 +232,9 @@ int scoutfs_seg_alloc(struct super_block *sb, struct scoutfs_segment **seg_ret)
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* reads shouldn't wait for this */
|
||||
set_bit(SF_END_IO, &seg->flags);
|
||||
|
||||
/* XXX always remove existing segs, is that necessary? */
|
||||
spin_lock_irqsave(&cac->lock, flags);
|
||||
atomic_inc(&seg->refcount);
|
||||
|
||||
Reference in New Issue
Block a user