Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on May 19, 2011
  1. @garlick

    Prep for 1.0-pre30 tag

    garlick authored
  2. @garlick
  3. @garlick
  4. @garlick

    Add threadmode=aname option (issue 26)

    garlick authored
    By default, the server starts one threadpool as before.  However,
    if diod is started with --threadmode=aname, then a new threadpool
    is started up for each unique aname (except 'ctl' which is handled
    with the default threadpool)
    
    This solves issue 26, where a down NFS server mounted with -ohard
    that is being forwarded through diod could hang the threadpool,
    preventing access to other file systems.
    
    Thread pools, with private request queues, are created/selected at
    attach time and a reference to the thread pool is attached to the fid.
    Cloned fids inherit a reference back to the thread pool selected at
    attach time.  Thread pools are destroyed when their reference count
    goes to zero (all fids are clunked = file system is unmounted).
  5. @garlick

    Add default diodcat options

    garlick authored
     -h locahost
     -a ctl
     version
    
    So it can be run as a "server alive" debugging tool with minimal
    command line pain, per suggestion from Jim Silva.
Commits on May 18, 2011
  1. @garlick

    More groundwork for thread scheduling

    garlick authored
    Create a new data structure, Nptpool for a thread pool, and give
    the Npsrv a linked listed of them.  At this point create only one,
    but change all points of access so they can work with multiple tpools.
  2. @garlick

    Associate aname with each request for thread scheduling.

    garlick authored
    Create fid->aname and look up each request's fid before enqueueing
    for the server.  This allows us to, for example, create a separate
    queue and worker thread pool for each forwarded file system, so when
    one gets stuck the entire server doesn't deadlock.
Commits on May 17, 2011
  1. @garlick
  2. @garlick
  3. @garlick
Commits on May 16, 2011
  1. @garlick

    Prep for 1.0-pre29 tag

    garlick authored
  2. @garlick

    Rename synthetic namespace to ctl and add exports

    garlick authored
    Instead of mounting synthetic file system with nil aname, use
    aname=ctl (issue 38).
    
    Fix a bug in diodmount where aname was used uninitialized in
    initial pre-auth mount from user space.  Add CFLAGS=-Werror to
    spec file build so compiler warnings get noticed when building
    a package.
    
    In diodmount, clunk the afid, if any, when attach fails.
    
    Rename internal names from np_syn_* to np_ctl_*.
    Rename np_ctl_mkdir to np_ctl_adddir to avoid confusion with op
    callback that would have the same name.
    
    Add quotes around all Npstr's in trace output, so empty strings
    stand out from white space, then fix up regression tests that were
    expecting the non-quoted output.
    
    Implement ctl/exports
    
    Make it possible for clients, etc. to access the list of exported
    file systems through ctl/exports.  Modify auto.diod to use this
    to map automounter keys.
    
    In the process, split export handling code in diod/ops.c out to
    diod/exp.c.
    
    Also fixed an incidental config problem where defaults were not
    restored when config file values that were previously set explicitly,
    were commented out and the server sent a SIGHUP.
    
    Minor cleanup.
Commits on May 14, 2011
  1. @garlick

    Prep for 1.0-pre28 tag

    garlick authored
  2. @garlick

    Clean up synthetic file code, add new files

    garlick authored
    Rename File to Npfile.  Add np_syn_mkdir () so an entire hierarchy
    can be externally created.  The internal synthetic namespace is
    selected (only) by nil aname.  Move the usercache onto the Npsrv
    struct so we can free it when the server is cleaned up.
    
    Add 'usercache' - list users in cache and ttl
    
    Add "connections" - includes last aname attached, active fids in the
    fidpool, and number of requests submitted and retired.
    
    Add "wthreads" - thread state, fsuid, fsgid, number of requests handled.
Commits on May 13, 2011
  1. @garlick
  2. @garlick
  3. @garlick

    Add functional synthetic files

    garlick authored
    Mount with nil aname and get access to 'connections' (list of conected
    clients), and 'version' (diod version).
    
    Also renamed lopen argument from mode to flags.  It was a misnomer.
Commits on May 12, 2011
  1. @garlick

    Add beginning of npfile replacement.

    garlick authored
    Use P9_QTTMP qid type flag to identify synthetic files.  Handle them
    along side a regular server so they can be used to implement utilities that
    monitor or reconfigure the server.  Identify synthetic files in an attach
    for an aname that does not begin with a "/" character.
Commits on May 11, 2011
  1. @garlick

    Housecleaning in libnpfs

    garlick authored
    Dropped unused npfile code.
    
    Removed indirection through np_default_op functions and just handle
    ENOSYS in the np_op handlers.
  2. @garlick

    Don't setfsgid to gid outside of user's sg set

    garlick authored
    Return EPERM to P9_LCREATE et al if the provided gid is not one of
    the user's supplemental groups.
    
    Without this check, a user could get elevated privilege in a server
    running as root by attaching as themselves from user space and
    issuing requests with arbitrary gids.  Add a testcase demonstrating
    this.
Commits on May 10, 2011
  1. @garlick
  2. @garlick

    Add --no-userdb option.

    garlick authored
    This option tells diod to ignore the password and group db's and
    allow attaches from any user, assuming gid == uid, and no additional
    group membership.
  3. @garlick
  4. @garlick
Commits on May 9, 2011
  1. @garlick
Commits on May 6, 2011
  1. @garlick

    autoreconf for new version

    garlick authored
  2. @garlick

    prep for pre27 tag

    garlick authored
  3. @garlick
Commits on May 5, 2011
  1. @garlick
  2. @garlick

    Don't call setgroups () for root

    garlick authored
    And remember whose groups are loaded so if that user runs next
    in this worker, we don't have to load them then either.
    
    Also, instead of always calling setfsuid and setfsgid in each
    thread's first work item, initialize to geteuid and getegid and
    only call if they're different.
  3. @garlick

    Add a short-lived cache for password/group data

    garlick authored
    Optimize the case where many clients all mount file systems on behalf
    of the same user by adding a 60s ttl cache for Npuser data.
    
    This minimizes the number of password/group file lookups in that case,
    and causes the cached Npuser data to be shared rather than duplicated.
    
    Although Npuser's are only in the cache for 60s, as before, users
    holding a reference on them won't see updated data after 60s.
    In other words, updates to supplemental group membership won't be
    picked up by existing mounts.
    
    As a side effect, a usercache mutex serializes all password/group
    file lookup functions.  However there should be many many fewer of them.
  4. @garlick

    Protect getgrouplist with a mutex

    garlick authored
    Put a lock around getgrouplist as I don't think it's thread safe.
    
    Change the prototype of srv->remapuser so it handles the entire
    process of remapping a fid's user.
    
    Pass srv into user routines to facilitate more complete logging.
  5. @garlick

    Don't lookup user in attach if auth already did it

    garlick authored
    Avoid back to back password file lookups between auth and attach.
    Add np_afid2user () which checks if the attaching user is the same as
    the auth user and then takes another reference on that Npuser and returns it.
    
    Clean up log messages in auth and attach handlers in libnpfs.
    
    Clean up log messages in diod_auth.c and make the code more resilient
    to unexpected argument values.
Commits on May 4, 2011
  1. @garlick
  2. @garlick
Something went wrong with that request. Please try again.