diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2001-05-06 13:18:29 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2001-05-06 13:18:29 +0000 |
commit | 4b4f61e2b0cf3a2db99d67456e8fe34ebabbb282 (patch) | |
tree | b48a1a614b4a80a3c4a2c95c6bdf8fb2d5106d10 | |
parent | c18e8c1bcf2d19d6dcbc9501405890c346738c6d (diff) |
libstore/
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
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | libstore/ChangeLog | 4 | ||||
-rw-r--r-- | libstore/set.c | 2 | ||||
-rw-r--r-- | storeio/ChangeLog | 6 | ||||
-rw-r--r-- | storeio/dev.c | 12 |
5 files changed, 21 insertions, 5 deletions
@@ -89,6 +89,8 @@ See `tasks', the exported task list. ** libstore: *** Add lock protocol for mutable stores. +*** Creating/opening stores with STORE_INACTIVE should work (and then the hack + in storeio/dev.c should be removed). ** libfsserver/libnetfs: *** convert libnetfs to libfsserver diff --git a/libstore/ChangeLog b/libstore/ChangeLog index 9a6ee4d8..af253b67 100644 --- a/libstore/ChangeLog +++ b/libstore/ChangeLog @@ -1,3 +1,7 @@ +2001-04-26 Marcus Brinkmann <marcus@ulysses.dhis.net> + + * set.c: Use explicit comparison to MACH_PORT_NULL. + 2001-03-07 Roland McGrath <roland@frob.com> * store.h (store_write, store_write_meth_t): Make buffer arg const*. diff --git a/libstore/set.c b/libstore/set.c index ab9747ff..26a26075 100644 --- a/libstore/set.c +++ b/libstore/set.c @@ -69,7 +69,7 @@ store_set_name (struct store *store, const char *name) source from which it was created. */ void store_close_source (struct store *store) { - if (store->source) + if (store->source != MACH_PORT_NULL) { mach_port_deallocate (mach_task_self (), store->source); store->source = MACH_PORT_NULL; diff --git a/storeio/ChangeLog b/storeio/ChangeLog index 43a300ab..5e08f51a 100644 --- a/storeio/ChangeLog +++ b/storeio/ChangeLog @@ -1,3 +1,9 @@ +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. diff --git a/storeio/dev.c b/storeio/dev.c index 108e7dd3..0c795a4b 100644 --- a/storeio/dev.c +++ b/storeio/dev.c @@ -145,19 +145,23 @@ dev_open (struct dev *dev) /* This means we had no store arguments. We are to operate on our underlying node. */ err = store_create (storeio_fsys->underlying, - STORE_INACTIVE | (dev->readonly ? STORE_READONLY : 0), + dev->readonly ? STORE_READONLY : 0, 0, &dev->store); - } else /* Open based on the previously parsed store arguments. */ err = store_parsed_open (dev->store_name, - STORE_INACTIVE - | (dev->readonly ? STORE_READONLY : 0), + dev->readonly ? STORE_READONLY : 0, &dev->store); if (err) return err; + /* Inactivate the store, it will be activated at first access. + We ignore possible EINVAL here. XXX Pass STORE_INACTIVE to + store_create/store_parsed_open instead when libstore is fixed + to support this. */ + store_set_flags (dev->store, STORE_INACTIVE); + dev->buf = mmap (0, dev->store->block_size, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0); if (dev->buf == MAP_FAILED) |