Project

General

Profile

Feature #4923

want preadv and pwritev

Added by Daniel Hoffman over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Low
Category:
kernel
Start date:
2014-06-12
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-review

Description

preadv and pwritev are not yet implemented in illumos. These system calls provide support for io vector support for arbitrary offset i/o.

History

#1

Updated by Daniel Hoffman over 5 years ago

  • % Done changed from 100 to 90

preadv and pwritev are not standard system calls, but they exist in linux (see http://linux.die.net/man/2/preadv) and BSD (http://www.freebsd.org/cgi/man.cgi?query=read&sektion=2&manpath=FreeBSD+7.0-RELEASE), so adding them to illumos seems advantageous.

#2

Updated by Igor Pashev over 5 years ago

Please, whatever you do, don't break existing syscalls.

#3

Updated by Daniel Hoffman over 5 years ago

I have a webrev here if anyone would like to give feedback.

http://us-east.manta.joyent.com/dj.hoffman/public/preadv-pwritev-4/index.html

#4

Updated by Jason King over 5 years ago

Line 950:
Use boolean_t for boolean variables

Line 1176:
I suspect this should be 'CPU_STATS_ADDQ(cp, sys, (write) ? syswrite : sysread, 1); or just add the lines to the if statement just below it

#5

Updated by Daniel Hoffman over 5 years ago

It should be in the if statement, because CPU_STATS_ADDQ expands into a macro that glues together a function name from the inputs, so the ternary operator doesn't work.

Updated with Jason's comments.

#6

Updated by Electric Monk almost 5 years ago

  • Status changed from New to Closed
  • % Done changed from 90 to 100

git commit fca543ca45b12c44a243625bce68b645ba8ed791

commit  fca543ca45b12c44a243625bce68b645ba8ed791
Author: DJ Hoffman <dj.hoffman@joyent.com>
Date:   2015-01-14T21:51:40.000Z

    4923 want preadv and pwritev
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Robert Mustacchi <robert.mustacchi@joyent.com>
    Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Garrett D'Amore <garrett@damore.org>

Also available in: Atom PDF