tech-kern archive

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

Re: RFC: lseek() extensions: SEEK_HOLE / SEEK_DATA with patch



On Mon, Aug 08, 2011 at 12:15:03AM +0000, David Holland wrote:
>  > >    struct range range;
>  > > 
>  > >    while (pos < len) {
>  > >       fgetrange(fd, pos, &range);
>  > >       if (range.r_type == RANGE_DATA) {
>  > >          amount = range.r_end - pos;
>  > >          if (amount > sizeof(buf)) {
>  > >             amount = sizeof(buf);
>  > >          }
>  > >          pread(fd, buf, amount, pos);
>  > >          pwrite(outfd, buf, amount, pos);
>  > >       }
>  > >       pos = range.r_end;
>  > >    }

Shall i try to work this out a bit more? with `fgetrange' being a frontend or
define to an fcntl (like in the form of an _FCNRW())? that saves the
implementation of a new systemcall and a new VOP for all FS's.

With regards,
Reinoud


Home | Main Index | Thread Index | Old Index