Re: [PATCH 3/4] aio: implement IOCB_CMD_POLL

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

 



On Thu, Aug 02, 2018 at 12:54:12AM +0100, Al Viro wrote:
> On Mon, Jul 30, 2018 at 09:15:43AM +0200, Christoph Hellwig wrote:
> 
> > +	apt.error = -EINVAL; /* same as no support for IOCB_CMD_POLL */
> 
> > +	mask = vfs_poll(req->file, &apt.pt) & req->events;
> > +	if (mask || apt.error) {
> > +		bool removed = false;
> > +
> > +		/* we did not manage to set up a waitqueue, done */
> > +		if (unlikely(!req->head))
> > +			goto out_fput;
> 
> > +out_fput:
> > +	fput(req->file);
> > +	return apt.error;
> 
> Ugh...  So anything that simply returns a constant value, without
> even bothering to do poll_wait() (on the theory that no matter how
> much you wait, nothing will change) is going to git -EINVAL?
> What am I missing here?

I can change it to return that constant value, but is it really going
to be useful to keep resubmitting an iocb for something that we can't
actually poll?  I don't think we help the application with that at all.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux