Skip to content
Commits on May 19, 2011
  1. @garlick

    Prep for 1.0-pre30 tag

    garlick committed May 19, 2011
  2. @garlick
  3. @garlick
  4. @garlick

    Add threadmode=aname option (issue 26)

    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).
    garlick committed May 19, 2011
  5. @garlick

    Add default diodcat options

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

    More groundwork for thread scheduling

    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.
    garlick committed May 18, 2011
  2. @garlick

    Associate aname with each request for thread scheduling.

    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.
    garlick committed May 17, 2011
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 committed May 16, 2011
  2. @garlick

    Rename synthetic namespace to ctl and add exports

    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
    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.
    garlick committed May 16, 2011
Commits on May 14, 2011
  1. @garlick

    Prep for 1.0-pre28 tag

    garlick committed May 13, 2011
  2. @garlick

    Clean up synthetic file code, add new files

    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.
    garlick committed May 13, 2011
Commits on May 13, 2011
  1. @garlick
  2. @garlick
  3. @garlick

    Add functional synthetic files

    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.
    garlick committed May 12, 2011
Commits on May 12, 2011
  1. @garlick

    Add beginning of npfile replacement.

    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.
    garlick committed May 11, 2011
Commits on May 11, 2011
  1. @garlick

    Housecleaning in libnpfs

    Dropped unused npfile code.
    Removed indirection through np_default_op functions and just handle
    ENOSYS in the np_op handlers.
    garlick committed May 11, 2011
  2. @garlick

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

    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
    garlick committed May 11, 2011
Commits on May 10, 2011
  1. @garlick

    Update NEWS for changes thus far

    garlick committed May 10, 2011
  2. @garlick

    Add --no-userdb option.

    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.
    garlick committed May 10, 2011
  3. @garlick

    Flush the usercache on a SIGHUP.

    garlick committed May 10, 2011
  4. @garlick
Commits on May 9, 2011
  1. @garlick
Commits on May 6, 2011
  1. @garlick

    autoreconf for new version

    garlick committed May 5, 2011
  2. @garlick

    prep for pre27 tag

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

    Don't call setgroups () for root

    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.
    garlick committed May 5, 2011
  3. @garlick

    Add a short-lived cache for password/group data

    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.
    garlick committed May 5, 2011
  4. @garlick

    Protect getgrouplist with a mutex

    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.
    garlick committed May 5, 2011
  5. @garlick

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

    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.
    garlick committed May 5, 2011
Commits on May 4, 2011
  1. @garlick
  2. @garlick
Something went wrong with that request. Please try again.