Re: [PATCH][RESEND] don't allow sys_readahead() on files opened with O_DIRECT

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

 



Jan Blunck <[email protected]> wrote:
>
> IMO sys_readahead() doesn't make sense if the file is opened with
> O_DIRECT, because the page cache is stuffed but never used. Therefore
> this patch changes that by letting the call return with -EINVAL.
> 

a) It doesn't hurt, it's just a bit of a silly thing to do.

b) posix_fadvise(POSIX_FADV_WILLNEED) should get the same treatment (and
   it's the preferred way of doing readahead).

c) O_DIRECT fd's should, as much as possible, offer the same ABI as
   buffered fd's.

d) The patch could break existing apps.
-
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]
  Powered by Linux