On Fri, Jul 15, 2005 at 01:22:55PM +0200, Jörn Engel wrote:
> On Fri, 15 July 2005 04:06:11 -0700, Andrew Morton wrote:
> > > +
> > > + /* There is no sane reason to use O_DIRECT */
> > > + BUG_ON(file->f_flags & O_DIRECT);
> >
> > err, this seems like an easy way for people to make the kernel go BUG.
>
> Is there a sane use for O_DIRECT in combination with sendfile()?
>
> If not, I'd like to change sys_sendfile() and return -EINVAL for
> O_DIRECT file descriptors.
>
> > > + if (unlikely(signal_pending(current)))
> > > + return -EINTR;
> >
> > This doesn't help. The reason we've avoided file-to-file sendfile() is
> > that it can cause applications to get uninterruptibly stuck in the kernel
> > for ages. This code doesn't solve that problem. It needs to handle
> > signal_pending() inside the main loop.
> >
> > And it probably needs to return a sane value (number of bytes copied)
> > rather than -EINTR.
>
> Makes sense.
>
> > I don't know if we want to add this feature, really. It's such a
> > specialised thing.
>
> With union mount and cowlink, there are two users already. cp(1)
> could use it as well, even if the improvement is quite minimal.
you might soon add linux-vserver to the list, as
we will be using this for a special version of the
COW links (to break unified links on write) ...
best,
Herbert
> Jörn
>
> --
> All art is but imitation of nature.
> -- Lucius Annaeus Seneca
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|