Age | Commit message (Collapse) | Author |
|
|
|
* storeio.c (trivfs_modify_stat): Clear writable bits if open store is
readonly, not just if we got the --readonly switch.
|
|
|
|
* 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.
|
|
|
|
* dev.h (struct dev): New member `enforced'.
* storeio.c (enforce_store): New variable.
(options, parse_opt, trivfs_append_args): Grok new option
--enforced/-e to set enforce_store.
(check_open_hook): Set DEVICE->enforced from enforce_store.
* io.c (trivfs_S_file_get_storage_info): If DEV->enforced is set
and the store flags lack STORE_ENFORCED, then return STORAGE_OTHER.
|
|
* storeio.c (check_open_hook): Don't check for D_NO_SUCH_DEVICE here.
Translation to ENXIO now done in libstore.
* dev.h (struct dev): New member `enforced'.
* storeio.c (enforce_store): New variable.
(options, parse_opt, trivfs_append_args): Grok new option
--enforced/-e to set enforce_store.
(check_open_hook): Set DEVICE->enforced from enforce_store.
* io.c (trivfs_S_file_get_storage_info): If DEV->enforced is set
and the store flags lack STORE_ENFORCED, then return STORAGE_OTHER.
|
|
* io.c (trivfs_S_file_get_storage_info): Fail with EOPNOTSUPP when
there is no store open.
* dev.h (struct dev): New member `enforced'.
* storeio.c (enforce_store): New variable.
(options, parse_opt, trivfs_append_args): Grok new option
--enforced/-e to set enforce_store.
(check_open_hook): Set DEVICE->enforced from enforce_store.
* io.c (trivfs_S_file_get_storage_info): If DEV->enforced is set
and the store flags lack STORE_ENFORCED, then return STORAGE_OTHER.
|
|
|
|
* io.c (trivfs_S_io_map): Renamed to ...
(trivfs_S_io_map_segment): ... here, and accept parameter `index'.
|
|
|
|
* dev.c (dev_read: ensure_buf): Fix sloppy bugs in last change.
|
|
* dev.c (dev_open): Use mmap instead of vm_allocate.
(dev_read): Likewise.
|
|
|
|
* dev.c: Add #include <sys/mman.h> for munmap decl.
* pager.c: Likewise.
|
|
* dev.c (dev_buf_fill): Use munmap instead of vm_deallocate.
(dev_close): Likewise.
(dev_read): Likewise.
* pager.c (pager_write_page): Likewise.
|
|
|
|
* storeio.c (check_open_hook): Translate D_NO_SUCH_DEVICE to ENXIO.
|
|
|
|
|
|
* pager.c (dev_stop_paging): Do not try to count ports in
PAGER_PORT_BUCKET if it has not been created.
|
|
|
|
* storeio.c (trivfs_modify_stat): Do not assume that we have the
device open in the caculation of st_mode. If the device is not
open, only return S_IFCHR if inhibit_cache is set.
|
|
|
|
* storeio.c (trivfs_modify_stat): Return S_IFCHR if block size is 1.
|
|
|
|
* storeio.c (trivfs_modify_stat): Return S_IFCHR iff inhibit_cache
set, otherwsie S_IFBLK. For a block-addressed device, S_IFCHR means
"must do whole-block i/o".
|
|
|
|
* io.c (trivfs_S_file_syncfs): Fix inverted test.
Reported by OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>.
|
|
|
|
* 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.
|
|
|
|
|
|
* storeio.c (main): Fix return type to int, and use return.
|
|
* pager.c (dev_get_memory_object): Deal with errors from
pager_create properly.
|
|
* pager.c (service_paging_requests): New args for
ports_manage_port_operations_multithread.
* storeio.c (main): Likewise.
|
|
|
|
Don't bother returning EBADF.
(trivfs_S_io_readable, trivfs_S_io_read, trivfs_S_io_map):
Return EBADF instead of EINVAL.
|
|
|
|
Return EINVAL instead of EBADF.
(trivfs_S_io_map):
Return EINVAL if CRED cannot be read or written.
|
|
|
|
Add iohelp.
|
|
|
|
Add PROT arg.
Use store_map.
|
|
Pass PROT argument to dev_get_memory_object.
|
|
Add PROT arg.
|
|
|
|
|
|
|
|
Make sure there are enough references to MEMOBJ for both read & write ports.
|