Re: [PATCH 4/7] O_NONBLOCK flag for readv2/preadv2

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

 



Milosz Tanski <milosz@xxxxxxxxx> writes:

>> Why did you put the wouldblock label inside the loop?  That should be
>> pushed down to just above out, and then you can get rid of the goto.
>
> When I put the code outside the loop it actually looked worse (imo):
>
> }
>
> goto out;
>
> would_block:
> error = -EAGAIN;
>
> out:
> ...
>

We don't exit the loop without a return or a goto, so you wouldn't need
that 'goto out' just below the end of the loop.  It would look like:

	}

would_block:
	error = -EAGAIN;
out:
...

> Point taken and I can fix this for the next version further up the
> stack. A longer term question is how the flags the file is open with
> interact with the read/write flags ... since I imagine folks will want
> to add other flags (like force a SYNC write).

I think we'll have to address those one at a time.  I do like the idea
of the SYNC flag for a write, though you'll probably have several
variants of that (equivalents of SYNC and DSYNC at least).  Another fun
write flag to consider is O_ATOMIC.  :)

Cheers,
Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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