aboutsummaryrefslogtreecommitdiff
path: root/storeio/dev.c
Commit message (Collapse)AuthorAgeFilesLines
* fix common misspellingsJonathan Neuschäfer2011-08-201-3/+3
| | | | | | * Fix spelling with codespell[1] and manually review it. [1] http://git.profusion.mobi/cgit.cgi/lucas/codespell/
* Update copyright years.Thomas Schwinge2008-07-011-1/+2
|
* * dev.c (dev_buf_rw, buffered_rw, dev_rw): Remove inline qualifier fromSamuel Thibault2008-06-101-12/+12
| | | | parameters `buf_rw'.
* 2002-03-10 Roland McGrath <roland@frob.com>Roland McGrath2002-03-111-1/+8
| | | | | * dev.c (dev_read): Return success with *LEN = 0 when reading exactly at the end of the store.
* 2001-12-28 Roland McGrath <roland@frob.com>Roland McGrath2002-01-021-7/+5
| | | | | | | | * dev.h (struct dev): New member `no_fileio' (flag). * storeio.c (options): Add --no-file-io/-F. (parse_opt): Parse it to set PARAMS->dev->no_fileio. (trivfs_append_args): Add --no-file-io if it's set. * dev.c (dev_open): Pass STORE_NOFILEIO flag if DEV->no_fileio is set.
* libstore/Marcus Brinkmann2001-05-061-4/+8
| | | | | | | | | | | | | | | | | | | | | 2001-04-26 Marcus Brinkmann <marcus@ulysses.dhis.net> * set.c: Use explicit comparison to MACH_PORT_NULL. storeio/ 2001-05-06 Marcus Brinkmann <marcus@gnu.org> * dev.c (dev_open): Do not create/open the store with STORE_INACTIVE, as this doesn't work correctly. Inactivate the store afterwards instead. 2001-02-18 Marcus Brinkmann <marcus@gnu.org> * dev.h (struct dev): New member nperopens. * storeio.c (open_hook): Hold device lock and check if this is the TODO: add item about the storeio hack
* 2001-02-18 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2001-04-191-2/+3
| | | | | | | | | | * dev.h (struct dev): New member nperopens. * storeio.c (open_hook): Hold device lock and check if this is the first open. If yes, activate the store. (close_hook): Hold global_lock and check if this was the last open. If yes, inactivate the store. * dev.c (dev_open): Open the store with STORE_INACTIVE (in store_parsed_open as well as in store_create).
* 2001-01-17 Roland McGrath <roland@frob.com>Roland McGrath2001-01-171-1/+1
| | | | * dev.c (dev_buf_discard): Don't check AMOUNT if store_write failed.
* 2001-01-16 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2001-01-161-1/+1
| | | | | | | * dev.c (dev_open): Add missing argument `classes' to invocation of store_create. * dev.h: Include <hurd/trivfs.h> for struct trivfs_control.
* 2001-01-16 Roland McGrath <roland@frob.com>Roland McGrath2001-01-161-4/+15
| | | | | | | | | * storeio.c (parse_opt): Set PARAMS->store_params.store_optional. (storeio_fsys): New global variable. (main): Use it. * dev.h: Declare it. * dev.c (dev_open): If DEV->store_name is null, open the underlying node using store_create.
* 2000-03-19 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath2000-03-191-33/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * dev.h (struct dev): New members store_name, readonly, rdev. (dev_is_readonly): New inline function. * dev.c (dev_open): Take just one arg, a struct dev whose store==0. (dev_close): Shut down the store, but leave DEV intact with store==0. * storeio.c (struct storeio_argp_params): New type. (device, device_lock, store_name): Variables removed. (readonly, inhibit_cache, enforce_store, rdev): Likewise. These are all now members in struct storeio_argp_params or struct dev; rdev now uses dev_t instead of int. (parse_opt): Find a struct storeio_argp_params in STATE->input and fill it in accordingly. Use makedev macro to construct rdev. (trivfs_append_args): Find options in struct dev off control hook. Use major, minor macros. (main): Make DEVICE a local here, and point FSYS->hook at it. Don't modify trivfs_allow_open. (getroot_hook): New static function. (trivfs_getroot_hook): New variable, initialized to that. (check_open_hook): Find struct dev in CNTL->hook and use new dev_open interface. Use dev_is_readonly. (open_hook): Find struct dev in PEROPEN->cntl->hook and check DEV->store. (trivfs_modify_stat): Find struct dev in CRED->po->cntl->hook. Use dev_is_readonly. (trivfs_goaway): Find struct dev in FSYS->hook and use its lock. (trivfs_S_fsys_syncfs): Find struct dev in CNTL->hook.
* 1999-11-20 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-11-211-8/+20
| | | | | | | * dev.c (dev_read, dev_write): In DEV->inhibit_cache case, handle zero (i.e. unknown) block_size by treating it as 1. Use shift and bitwise-and rather than multiply and modulus for block size arithmetic, since it's a known power of two.
* 1999-07-11 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-07-111-9/+8
| | | | * dev.c (dev_read: ensure_buf): Fix sloppy bugs in last change.
* 1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell1999-07-111-5/+6
| | | | | * dev.c (dev_open): Use mmap instead of vm_allocate. (dev_read): Likewise.
* 1999-07-10 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-07-111-0/+1
| | | | | * dev.c: Add #include <sys/mman.h> for munmap decl. * pager.c: Likewise.
* 1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell1999-07-031-7/+4
| | | | | | | * dev.c (dev_buf_fill): Use munmap instead of vm_deallocate. (dev_close): Likewise. (dev_read): Likewise. * pager.c (pager_write_page): Likewise.
* 1999-01-27 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-01-271-12/+56
| | | | | | | | | | | | | | | | * storeio.c (options): New option -c/--no-cache. (inhibit_cache): New variable. (parse_opt): Make -c set it. (trivfs_append_args): Report --no-cache if set. (check_open_hook): Pass inhibit_cache flag to dev_open. * dev.h (struct dev): New member `inhibit_cache'. (dev_open): Update decl. * dev.c (dev_open): Take new arg inhibit_cache, store in new dev. If set, don't initialize buf_offs, io_lock, pager, pager_lock. (dev_read, dev_write): If DEV->inhibit_cache is set, allow only whole-block i/o: EINVAL for non-whole-block attempts. * pager.c (dev_get_memory_object): If DEV->inhibit_cache is set, don't make our own pager; if store_map returns EOPNOTSUPP, so do we.
* Add braces to silence gcc warnings.Roland McGrath1998-10-201-11/+13
|
* (dev_open):Miles Bader1996-09-231-5/+5
| | | | | | Remove CLASSES argument to store_parsed_open. (dev_buf_fill, dev_read, dev_write): Use void * buffers.
* (dev_rw): Return EINVAL instead of EIO for too-large offsets.Miles Bader1996-09-141-12/+1
| | | | | (dev_open, dev_close): Remove ifdef'd-out code for allocating DEV's buffer with valloc; other things depend on it being vm_allocated.
* Initial checkinMiles Bader1996-09-081-0/+414