Thread (27 messages) 27 messages, 4 authors, 2017-05-31

Re: [PATCH 09/10] xfs: nowait aio support

From: Christoph Hellwig <hch@infradead.org>
Date: 2017-05-29 08:33:39
Also in: linux-block, linux-btrfs, linux-ext4, linux-fsdevel, linux-xfs

On Sun, May 28, 2017 at 09:38:26PM -0500, Goldwyn Rodrigues wrote:

On 05/28/2017 04:31 AM, Christoph Hellwig wrote:
quoted
Despite my previous reviewed-by tag this will need another fix:

xfs_file_iomap_begin needs to return EAGAIN if we don't have the extent
list in memoery already.  E.g. something like this:

	if ((flags & IOMAP_NOWAIT) && !(ip->i_d.if_flags & XFS_IFEXTENTS)) {
		error = -EAGAIN;
		goto out_unlock;
	}

right after locking the ilock.
I am not sure if it is right to penalize the application to write to
file which has been freshly opened (and is the first one to open). It
basically means extent maps needs to be read from disk. Do you see a
reason it would have a non-deterministic wait if it is the only user? I
understand the block layer can block if it has too many requests though.
For either a read or a write we might have to read in the extent list
(note that for few enough extents they are stored in the inode and
we won't have to), in which case the call will block and by the
semantics you define we'll need to return -EAGAIN.

Btw, can you write a small blurb up for the man page to document these
ѕemantics in man-page like language?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help