Re: [PATCH 2/2] fs: update atime before I/O in generic_file_read_iter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 04, 2016 at 10:13:24AM +0200, Jan Kara wrote:
> But frankly it looks like a nasty catch that iocb->ki_filp can go away
> under you in the AIO case. Do I get it right that this means there must be
> some other thread closing your fd while the read is running, right?

Yes, that's what generic/323 tests.

> Also it seems that file_end_write(file) call in aio_run_iocb() is prone to
> the same race?

Indeed.  That's easy to fix by moving the file_end_write to aio_complete,
though.

> Won't we be better off to just to do additional get_file() / fput() pair in
> the AIO submission path so that whole AIO submission path is guaranteed to
> have struct file available? I understand this is very performance sensitive
> path but we'll be adding just two atomic ops...

I'd rather avoid those if we can.  But a big comment and some refactoring
in this area would be useful to make that easier to understand.
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux