lkml.org 
[lkml]   [2002]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: fadvise syscall?
Jan Hudec wrote:

>>Followup to: <5.1.0.14.2.20020318000057.051d30e0@pop.cus.cam.ac.uk>
>>By author: Anton Altaparmakov <aia21@cam.ac.uk>
>>In newsgroup: linux.dev.fs.devel
>>
>>>Ok, so basically we want both fadvise() and open(2) semantics, with the
>>>open(2) being a superset of the fadvise() capabilities (some things no
>>>longer make sense to be specified once the file is open). They can of
>>>course both be calling the same common helpers inside the kernel...
>>>
>>If they're open() flags, they should probably be controlled with
>>fcntl() rather than with a new system call.
>>
>
>Then posix_fadvise interface can be implemented in libc using fcntl.
>
Indeed it can be... but it less flexible that way, unless you want to
add another level of indirection.

It is far better for future-proofing the interface IMO if fadvise is
implementing directly. Hints are less important than open O_xxx flags
or F_xxx flags, because an implementation can safely ignore 100% of the
fadvise hints, if it so chooses. One cannot say the same thing for
open/fcntl flags.

So, different class of fd flags deserves a different syscall, IMO...

Jeff






-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.076 / U:2.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site