aboutsummaryrefslogtreecommitdiff
path: root/ext2fs
Commit message (Collapse)AuthorAgeFilesLines
...
* ext2fs: Reduce verbosity of missing xattr support on the FSSamuel Thibault2017-06-091-1/+1
| | | | | * ext2fs/xattr.c (ext2_free_xattr_block): Only warn about missing ext2fs support in debugging mode.
* ext2fs: Reduce verbosity of missing xattr support on the FSSamuel Thibault2017-05-071-2/+2
| | | | | * ext2fs/xattr.c (ext2_list_xattr, ext2_get_xattr): Only warn about missing ext2fs support in debugging mode.
* ext2fs: downgrade warnings about old translator records to debug messagesRichard Braun2017-01-081-2/+2
| | | | | | ext2fs/inode.c (diskfs_set_translator): Replace call to ext2_warning with ext2_debug. (diskfs_get_translator): Likewise.
* ext2fs: fix extended attribute retrievalRichard Braun2017-01-061-2/+1
| | | | | * ext2fs/xattr.c (ext2_get_xattr): Reset buffer size before each call to xattr_entry_get.
* ext2fs: minor cleanupRichard Braun2017-01-062-7/+7
| | | | | | | | | | | | | Fix some typos, types, add a few checks against integer overflows. ext2fs/inode.c (diskfs_user_read_node): Initialize datalen to 0. (diskfs_set_translator): Fix typo. (diskfs_get_translator): Change datalen type to size_t. * ext2fs/xattr.c (xattr_entry_get): Change type of block parameter to void *. (xattr_entry_create): Guard against integer overflows. (xattr_entry_replace): Likewise. (ext2_set_xattr): Fix typo.
* ext2fs: fix block referenceRichard Braun2017-01-061-5/+4
| | | | | ext2fs/xattr.c (ext2_get_xattr): Keep the inode reference until the block reference is done.
* ext2fs: Fix potential block leak.Justus Winter2017-01-061-0/+4
| | | | | | * ext2fs/xattr.c (ext2_set_xattr): We allocate a block, but only register it as the inodes acl block on success. Make sure to deallocate the block otherwise.
* ext2fs: Fix block allocation.Justus Winter2017-01-061-1/+1
| | | | | * ext2fs/xattr.c (ext2_set_xattr): Check returned block number before mapping it.
* ext2fs: Require users to opt-in for xattr-based translator records.Justus Winter2017-01-063-2/+28
| | | | | | | | | | * ext2fs/ext2fs.c (use_xattr_translator_records): New variable. (X_XATTR_TRANSLATOR_RECORDS): New macro. (options): New option '--x-xattr-translator-records'. (parse_opt): Handle new option. * ext2fs/ext2fs.h (use_xattr_translator_records): New declaration. * ext2fs/inode.c (diskfs_set_translator): Use new variable. (diskfs_get_translator): Likewise.
* ext2fs: Do not read translator record on Linux filesystems.Justus Winter2017-01-061-4/+0
| | | | | | | * ext2fs/inode.c (diskfs_user_read_node): Do not read translator record on filesystems using Linux on-disk format. We pondered to use this to introduce the feature, implementing it merely for Linux filesystem.
* ext2fs: Fix block leak in xattr code.Justus Winter2017-01-061-0/+8
| | | | | | * ext2fs/xattr.c (ext2_set_xattr): Avoid allocating and leaking a block if the caller tries to delete an extended attribute from a node that has no extended attribute in the first place.
* ext2fs: Use correct type for sizes.Justus Winter2017-01-062-22/+22
| | | | | | | * ext2fs/ext2fs.h (ext2_{list,get,set}_xattr): Use 'size_t'. * ext2fs/xattr.c (xattr_entry_{list,get,create): Use 'size_t' where appropriate. (ext2_{list,get,set}_xattr): Likewise.
* ext2fs: Fix typo.Justus Winter2017-01-061-1/+1
|
* ext2fs: Use xattr to store passive translatorShengyu Zhang2017-01-061-63/+161
| | | | | | | * ext2fs/inode.c (diskfs_set_translator): Use xattr to store passive translator if xattr is supported by filesystem. (diskfs_get_translator): Read value of xattr key "gnu.translator" if it exists. (diskfs_user_read_node): Set translator flag on reading.
* ext2fs: Add support for xattrShengyu Zhang2017-01-066-2/+970
| | | | | | | | | * ext2fs/Makefile (SRCS): Add xattr.c. * ext2fs/ext2_fs.h: Define EXT2_FEATURE_COMPAT_EXT_ATTR. * ext2fs/ext2fs.h: Add xattr functions. * ext2fs/ialloc.c (diskfs_free_node): Free xattr block. * ext2fs/xattr.c: xattr implement. * ext2fs/xattr.h: Likewise.
* ext2fs: Use more POSIXish error codeSamuel Thibault2016-11-201-0/+2
| | | | | * ext2fs/dir.c (diskfs_direnter_hard): On missing room to extend directory, return ENOSPC.
* ext2fs: Do not talk about crashing on ENOSPCSamuel Thibault2016-11-201-1/+1
| | | | | * ext2fs/pager.c (pager_unlock_page): Do not say that ext2fs will crash because of ENOSPC.
* ext2fs: Fix crash on ENOSPC while extending a directorySamuel Thibault2016-11-201-0/+8
| | | | | * ext2fs/dir.c (diskfs_direnter_hard): Call hurd_safe_memset on directory extension before using it, to actually reserve room.
* Add missing spinlock initializersSamuel Thibault2016-11-012-2/+5
| | | | | | | | | | Thanks Agustina Arzille for the report * ext2fs/ext2fs.h (global_lock, modified_global_blocks_lock): Declare extern * ext2fs/ext2fs.c (global_lock, modified_global_blocks_lock): Define and initialize to PTHREAD_SPINLOCK_INITIALIZER. * libtreefs/xinl.c (treefs_node_refcnt_lock): Likewise.
* ext2fs: Poison pointers into dereferenced cache pages.Justus Winter2016-10-093-6/+10
| | | | | | | | | * ext2fs/ext2fs.h (disk_cache_block_deref): Replace with a macro that NULLs the given pointer. (dino_deref): Likewise. * ext2fs/pager.c (disk_cache_block_deref): Rename. * ext2fs/pokel.c (pokel_add): Adapt. (pokel_exec): Likewise.
* ext2fs: Rename parameter.Justus Winter2016-10-081-3/+3
| | | | | * ext2fs/ext2fs.h (sync_global_pointer): Rename 'bptr' so that it doesn't collide with the macro 'bptr'.
* ext2fs: Disable option to specify alternate superblock.Justus Winter2016-10-031-0/+9
| | | | | | * ext2fs/ext2fs.c (options): Disable '--sblock', this has never been implemented. (parse_opt): Likewise.
* libpager: provide 'pager_create_alloc'Justus Winter2016-08-071-14/+11
| | | | | | | | | | | | | | | | | | | | | Add a variant to 'pager_create' that allocates memory for the user hook next to the pager data increasing locality. * console/pager.c (pager_clear_user_data): Fix type of 'idx', do not free 'upi'. (user_pager_create): Use the new function. * doc/hurd.texi: Document new function. * ext2fs/pager.c (pager_clear_user_data): Don't free 'upi'. (diskfs_get_filemap): Use the new function. * fatfs/pager.c (pager_clear_user_data): Don't free 'upi'. (diskfs_get_filemap): Use the new function. * isofs/pager.c (pager_clear_user_data): Don't free 'upi'. (diskfs_get_filemap): Use the new function. * libpager/pager-create.c (_pager_create): New generic allocation function. (pager_create): Use the new generic function. (pager_create_alloc): New function. * libpager/pager.h (pager_create_alloc): New prototype.
* ext2fs: fix pager use-after-freeJustus Winter2016-05-221-11/+20
| | | | | | | | | | | | | Previously, pagers had no reference for being part of a node, only for having a send right made for them. Hence we sometimes saw use-after-free errors if the kernel did give up that send right, typically while deleting files. Keep a weak reference as long as the pager is referenced by a node. * ext2fs/pager.c (pager_clear_user_data): Assert that 'pager' has been NULLed. (pager_dropweak): Drop the weak reference and NULL 'pager'. (diskfs_get_filemap): Simplify. Acquire a weak reference.
* Fix supporting >4GiB files in ext2fsSamuel Thibault2016-04-262-7/+14
| | | | | | | | | | * ext2fs/inode.c (diskfs_user_read_node): When sizeof(off_t) >= 8, add di->i_size_high as high-64bit part to st->st_size. Drop setting unused info->i_high_size. (write_node): When sizeof(off_t) >= 8, write high-64bit part of st->st_size to di->i_size_high. * ext2fs/ext2_fs_i.h (ext2_inode_info): Remove i_high_size field. * pfinet/linux-src/include/linux/ext2_fs_i.h (ext2_inode_info): Likewise.
* ext2fs: Fix off-by-oneSamuel Thibault2016-03-181-1/+1
| | | | | * ext2fs/pager.c (disk_cache_init): Do not add disk_cache_info[disk_cache_blocks] to disk_cache_info_free.
* ext2fs: Fix adding blocks to free blocks cacheSamuel Thibault2016-03-151-1/+8
| | | | | | | | | * ext2fs/pager.c (disk_cache_info_free_push): Add prototype. (disk_pager_notify_evict): When dropping DC_INCORE flag, if the block becomes free (no reference and no DC_DONT_REUSE flags), call disk_cache_info_free_push. (disk_cache_block_deref): Only call disk_cache_info_free_push if the flags of the block do not contain DC_DONT_REUSE flags.
* Drop OTHERLIBS and use LDLIBS exclusivelyFlavio Cruz2015-12-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cross-compiling, OTHERLIBS magically turns -lpthread into the path to the host libpthread.so file, resulting in build issues. LDLIBS does not suffer from this problem and it seems that is already being used in other Makefiles. This patch removes OTHERLIBS entirely from the build system. * Makeconf: Remove references to OTHERLIBS * auth/Makefile: Replace OTHERLIBS with LDLIBS. * boot/Makefile: Likewise. * console/Makefile: Likewise. * exec/Makefile: Likewise. * ext2fs/Makefile: Likewise. * fatfs/Makefile: Likewise. * ftpfs/Makefile: Likewise. * hostmux/Makefile: Likewise. * isofs/Makefile: Likewise. * libhurd-slab/Makefile: Likewise. * nfs/Makefile: Likewise. * nfsd/Makefile: Likewise. * pfinet/Makefile: Likewise. * proc/Makefile: Likewise. * procfs/Makefile: Likewise. * random/Makefile: Likewise. * storeio/Makefile: Likewise. * term/Makefile: Likewise. * tmpfs/Makefile: Likewise. * usermux/Makefile: Likewise.
* fix compiler warnings in hurd/ext2fsFlavio Cruz2015-12-297-21/+21
| | | | | | | | | | | | ext2fs: Fix compiler warnings. * ext2fs/balloc.c: Use unsigned char instead of char. * ext2fs/bitmap.c Use unsigned char for bitmaps. * ext2fs/dir.c: Fix format. * ext2fs/ext2fs.h: Use unsigned char for bitmaps. * ext2fs/ialloc.c: Use unsigned char for bitmaps. Fix format string in ext2_warning. * ext2fs/pager.c: Fix format string in ext2_warning and ext2_error.
* ext2fs: keep list of reusable disk cache entriesJustus Winter2015-11-292-31/+53
| | | | | | | | | | | | This avoids a linear scan through the cache. * ext2fs/ext2fs.h (struct disk_cache_info): New field 'next'. * ext2fs/pager.c (disk_cache_hint): Drop. (disk_cache_info_free, disk_cache_info_free_lock): New variables. (disk_cache_info_free_pop, disk_cache_info_free_push): New functions. (disk_cache_init): Adjust slightly. (disk_cache_block_ref): Use new functions. (disk_cache_block_deref): Likewise.
* ext2fs: disable block cache debugging by defaultJustus Winter2015-11-292-5/+5
| | | | | * ext2fs/ext2fs.h: Disable block cache debugging by default. * ext2fs/pager.c: Likewise.
* ext2fs: improve the block cacheJustus Winter2015-11-291-4/+6
| | | | | | * ext2fs/pager.c (disk_cache_block_ref): Improve the cache by using the new lookup and insertion functions that return and use a location pointer.
* Remove unused variablesJustus Winter2015-11-061-2/+0
| | | | | | | * console/pager.c (user_pager_init): Remove unused variables. * ext2fs/pager.c (create_disk_pager): Likewise. * fatfs/pager.c (create_fat_pager): Likewise. * storeio/pager.c (init_dev_paging): Likewise.
* Fix race condition in ext2fs when remountingJames Clarke2015-09-063-2/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some systems, ext2fs.static would regularly hang at startup, as a race condition meant it would process paging requests while remounting. To fix this, libpager has been altered to allow inhibiting and resuming its worker threads, and ext2fs uses this to inhibit paging while remounting. * console/pager.c (pager_requests): New variable. (user_pager_init): Updated call to pager_start_workers to use new pager_requests variable. * daemons/runsystem.sh: Removed artificial delay working around the race condition. * ext2fs/ext2fs.c (diskfs_reload_global_state): Call new inhibit_ext2_pager and resume_ext2_pager functions, and leave sblock as non-NULL so it will be munmapped. * ext2fs/ext2fs.h (inhibit_ext2_pager,resume_ext2_pager): New functions. * ext2fs/pager.c (file_pager_requests): New variable. (create_disk_pager): Updated call to pager_start_workers to use new file_pager_requests variable. (inhibit_ext2_pager,resume_ext2_pager): New functions. * fatfs/fatfs.h (inhibit_fat_pager,resume_fat_pager): New functions. * fatfs/pager.c (file_pager_requests): New variable. (create_fat_pager): Updated call to pager_start_workers to use new file_pager_requests variable. (inhibit_fat_pager,resume_fat_pager): New functions. * libdiskfs/disk-pager.c (diskfs_disk_pager_requests): New variable. (diskfs_start_disk_pager): Updated call to pager_start_workers to use new diskfs_disk_pager_requests variable. * libdiskfs/diskfs-pager.h (diskfs_disk_pager_requests): New variable. * libpager/demuxer.c (struct pager_requests): Renamed struct requests to struct pager_requests. Replaced queue with queue_in and queue_out pointers. Added inhibit_wakeup field. (pager_demuxer): Updated to use new queue_in/queue_out pointers. Only wake up workers if not inhibited. (worker_func): Updated to use new queue_in/queue_out pointers. Final worker thread to sleep notifies the inhibit_wakeup condition variable. (pager_start_workers): Added out parameter for the requests instance. Allocate heap space shared by both queues. Initialise new inhibit_wakeup condition. (pager_inhibit_workers,pager_resume_workers): New functions. * libpager/pager.h (struct pager_requests): Public forward definition. (pager_start_workers): Added out parameter for the requests instance. (pager_inhibit_workers,pager_resume_workers): New functions. * libpager/queue.h (queue_empty): New function. * storeio/pager.c (pager_requests): New variable. (init_dev_paging): Updated call to pager_start_workers to use new pager_requests variable.
* ext2fs: provide unconditional debug macroJustus Winter2015-08-151-1/+3
| | | | | | * ext2fs/ext2fs.h (ext2_debug_): New macro that unconditionally prints the given message. (ext2_debug): Use the new macro.
* ext2fs: improve ext2fs debuggingJustus Winter2015-08-151-3/+2
| | | | | * ext2fs/ext2fs.h (ext2_debug): Print to stderr. (printf): Drop declaration.
* libdiskfs: implement a node cacheJustus Winter2015-04-174-226/+28
| | | | | | | | | | | | | | | | | | | | | Previously, all users of libdiskfs implemented a node cache on their own. Move the node cache from ext2fs into libdiskfs. We preserve the previous API by marking all functions that we pull from ext2fs as weak, so that users like tmpfs can still implement their own node cache. * ext2fs/dir.c (diskfs_lookup_hard): Adjust accordingly. * ext2fs/ext2fs.c (main): Don't call `inode_init'. * ext2fs/ext2fs.h (struct disknode): Drop `hnext', `hprevp'. * ext2fs/inode.c: Move the node cache into diskfs. (diskfs_user_make_node): New function. (diskfs_try_dropping_softrefs): Rename to `diskfs_user_try_dropping_softrefs'. (read_node): Rename to `diskfs_user_read_node'. Also move a chunk of code dealing with generations from `diskfs_cached_lookup' here. * libdiskfs/Makefile (OTHERSRCS): Add `node-cache.c'. * libdiskfs/diskfs.h (struct node): Add `hnext', `hprevp'. Amend existing comments, add forward declarations. * libdiskfs/node-cache.c: New file.
* ext2fs: use fat nodesJustus Winter2015-04-177-143/+147
| | | | | | | | | | | | | | | | | Use `diskfs_make_node_alloc' to allocate both the node and the disknode in a continuous chunk of memory. This increases locality and reduces the pressure on the memory allocator. * ext2fs/inode.c: Use `diskfs_node_disknode' to access the disknode. (diskfs_cached_lookup): Use `diskfs_make_node_alloc' to allocate the node. (diskfs_node_norefs): Only free `np'. * ext2fs/dir.c: Use `diskfs_node_disknode' to access the disknode. * ext2fs/ext2fs.h: Likewise. * ext2fs/getblk.c: Likewise. * ext2fs/ialloc.c: Likewise. * ext2fs/pager.c: Likewise. * ext2fs/truncate.c: Likewise.
* libdiskfs: lock-less reference counting of nodesJustus Winter2015-04-171-10/+5
| | | | | | | | | | | | | | | | | | | | * libdiskfs/diskfs.h (struct node): Use refcounts_t for reference counting. (diskfs_node_refcnt_lock): Remove. (diskfs_node_norefs,diskfs_drop_node): Change comments accordingly. * libdiskfs/init-init.c: Adjust accordingly. * libdiskfs/node-drop.c: Likewise. * libdiskfs/node-make.c: Likewise. * libdiskfs/node-nput.c: Likewise. * libdiskfs/node-nputl.c: Likewise. * libdiskfs/node-nref.c: Likewise. * libdiskfs/node-nrefl.c: Likewise. * libdiskfs/node-nrele.c: Likewise. * libdiskfs/node-nrelel.c: Likewise. * ext2fs/inode.c: Likewise. * fatfs/inode.c: Likewise. * isofs/inode.c: Likewise. * tmpfs/node.c: Likewise. * doc/hurd.texi: Likewise.
* ext2fs: use a seperate lock to protect nodehashJustus Winter2015-04-111-36/+92
| | | | | | | | | | | | | | | | | | | | | Previously, ext2fs used diskfs_node_refcnt_lock to serialize access to the nodehash. Use a separate lock to protect nodehash. Adjust the reference counting accordingly. Every node in the nodehash carries a light reference. When we are asked to give up that light reference, we reacquire our lock momentarily to check whether someone else reacquired a reference through the nodehash. * ext2fs/inode.c (nodecache_lock): New lock. (diskfs_cached_lookup): Use a separate lock to protect nodehash. Adjust the reference counting accordingly. (ifind): Likewise. (diskfs_node_iterate): Likewise. (diskfs_node_norefs): Move the code removing the node from nodehash... (diskfs_try_dropping_softrefs): ... here, where we check whether someone reacquired a reference, and if so hold on to our light reference.
* Replace `bcopy' with `memcpy' or `memmove' as appropriateJustus Winter2014-12-102-5/+5
| | | | | | | | | | | | | | | | | | | * ext2fs/inode.c: Replace `bcopy' with `memcpy' or `memmove' as appropriate. * ext2fs/pager.c: Likewise. * isofs/lookup.c: Likewise. * isofs/main.c: Likewise. * isofs/rr.c: Likewise. * libdiskfs/file-get-trans.c: Likewise. * libiohelp/return-buffer.c: Likewise. * libpager/pagemap.c: Likewise. * libpipe/pq.c: Likewise. * libpipe/pq.h: Likewise. * libstore/unzipstore.c: Likewise. * mach-defpager/default_pager.c: Likewise. * pfinet/ethernet.c: Likewise. * pfinet/tunnel.c: Likewise. * storeio/dev.c: Likewise.
* Replace `bzero' with `memset'Justus Winter2014-12-103-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For reference, this patch was created using the following semantic patch, and then manually applying the change in all functions containing nested functions, as those are not supported by Coccinelle. @@ expression A, B; @@ - bzero (A, B) + memset (A, 0, B) * auth/auth.c: Replace `bzero' with `memset'. * boot/boot.c: Likewise. * defpager/defpager.c: Likewise. * exec/exec.c: Likewise. Also, drop `safe_bzero' and just use `hurd_safe_memset' directly. * ext2fs/ext2fs.c: Likewise. * ext2fs/getblk.c: Likewise. * ext2fs/pager.c: Likewise. * fatfs/pager.c: Likewise. * ftpfs/dir.c: Likewise. * ftpfs/netfs.c: Likewise. * isofs/inode.c: Likewise. * isofs/pager.c: Likewise. * libdiskfs/file-getfh.c: Likewise. * libdiskfs/file-statfs.c: Likewise. * libfshelp/fetch-root.c: Likewise. * libfshelp/start-translator.c: Likewise. * libftpconn/create.c: Likewise. * libftpconn/open.c: Likewise. * libftpconn/unix.c: Likewise. * libpipe/pipe.c: Likewise. * libps/procstat.c: Likewise. * libps/spec.c: Likewise. * libshouldbeinlibc/cacheq.c: Likewise. * libshouldbeinlibc/idvec.c: Likewise. * libshouldbeinlibc/ugids.c: Likewise. * libstore/argp.c: Likewise. * libstore/enc.c: Likewise. * libstore/kids.c: Likewise. * libthreads/alpha/thread.c: Likewise. * libtreefs/fsys.c: Likewise. * libtrivfs/file-statfs.c: Likewise. * mach-defpager/default_pager.c: Likewise. * pfinet/glue-include/asm/uaccess.h: Likewise. * pfinet/io-ops.c: Likewise. * pfinet/options.c: Likewise. * pfinet/socket.c: Likewise. * pfinet/timer-emul.c: Likewise. * pflocal/io.c: Likewise. * startup/startup.c: Likewise. * storeio/storeio.c: Likewise. * sutils/fstab.c: Likewise. * usermux/usermux.c: Likewise. * utils/fakeauth.c: Likewise. * utils/frobauth.c: Likewise. * utils/login.c: Likewise. * utils/x.c: Likewise.
* ext2fs: tune the size of the inode cacheJustus Winter2014-12-101-1/+1
| | | | | | | | The node cache uses a fixed number of buckets giving it a linear access complexity, although with a small constant factor. Paper over this issue by increasing the number of buckets. * ext2fs/inode.c (INOHSZ): Increase from 512 to 8192 entries.
* libpager: use a fixed number of threadsJustus Winter2014-11-031-25/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, libpager used an unbounded number of threads to receive messages from the pager bucket. It used sequence barriers to execute the requests to order requests to each object. The sequence barriers are implemented in seqnos.c. A server function uses _pager_wait_for_seqno to wait for its sequence number and _pager_release_seqno to release it, or it uses _pager_update_seqno to do both operations in one step. These sequence barriers divide each server function in three parts: A, B, and C. A_i happens "before" the sequence barrier i, B_i happens "in order", C_i happens "after" the sequence barrier. This partial order < has the following properties: * This order is *per object*. Requests to different objects are not ordered. * A_i < B_i, B_i < C_i (due to the structure of the code) * B_i < B_{i+1} (this is due to the sequence barriers) * Note that only the B parts are ordered by the sequence numbers, we are free to execute C_i and C_{i+1} in any possible order. The same argument applies to the A parts. The sequence barriers are implemented using a very simple ticket algorithm. Every request, even the invalid ones, is processed by a thread, and waits until the ticket count reaches its seqno, does some work in-order, then increments the ticket and awakes all threads that have piled up up to this moment. All of them except one will then discover that it's not their turn yet and go to sleep again. Creating one thread per request has proven to be problematic as memory_object requests often arrive in large batches. This patch does two things: * Use a single thread to receive messages from the port bucket. All incoming request are put into a queue. * Use a fixed-number of threads (though even one is actually enough) to execute the the server functions. If multiple threads are used, a work-delegation mechanism ensures that the per object order < is preserved. For reference, I used the following command to create workloads that highlight the problem this patch is addressing: % settrans t .../ext2fs --sync=30 /dev/sd2s1 ... % /usr/bin/time zsh -c 'for ((i=0; i < 1500; i++)); do dd if=/dev/zero of=t/src/$i bs=4k count=290 2>/dev/null echo -n . if ((i % 100 == 0)) ; then echo -n $i; fi done' * libpager/queue.h: New file. * libpager/demuxer.c: Manage a queue of requests received from the port bucket. (pager_demuxer): Just decode the server function and enqueue the request. (worker_func): New function that consumes and executes the requests from the queue. (service_paging_requests): New function. (pager_start_workers): Likewise. * libpager/data-request.c: Remove the seqno barriers. * libpager/data-return.c: Likewise. * libpager/data-unlock.c: Likewise. * libpager/chg-compl.c: Likewise. * libpager/lock-completed.c: Likewise. * libpager/no-senders.c: Likewise. * libpager/notify-stubs.c: Likewise. * libpager/object-init.c: Likewise. * libpager/object-terminate.c: Likewise. * libpager/seqnos.c: Remove file. * libpager/stubs.c: Likewise. * libpager/pager.h (pager_demuxer): Drop declaration. (pager_start_workers): New declaration. * libpager/priv.h: Remove the _pager_seqno declarations. * libpager/Makefile (SRCS): Drop seqnos.c. * console/pager.c (user_pager_init): Call pager_start_workers. * libdiskfs/disk-pager.c: Likewise. * storeio/pager.c: Likewise. * ext2fs/pager.c (service_paging_requests): Remove function. (create_disk_pager): Start separate file pager using `pager_start_workers'. * fatfs/pager.c (service_paging_requests): Remove function. (create_fat_pager): Start separate file pager using `pager_start_workers'.
* ext2fs: use correct type for block numbersJustus Winter2014-06-231-3/+3
| | | | | * ext2fs/dir.c (count_dirents): Use block_t for nb. (diskfs_get_directs): Likewise for blkno, nblks.
* ext2fs: fix type of retry_dotdotJustus Winter2014-06-081-1/+1
| | | | * ext2fs/dir.c (diskfs_lookup_hard): Use ino_t for retry_dotdot.
* ext2fs: fix type of blockaddrJustus Winter2014-06-081-1/+1
| | | | * ext2fs/dir.c (diskfs_lookup_hard): Use vm_address_t for blockaddr.
* ext2fs: use size_t where appropriateJustus Winter2014-06-081-11/+11
| | | | * extfs/dir.c: Use size_t where appropriate.
* ext2fs: fix compiler warningJustus Winter2014-06-061-1/+1
| | | | * ext2fs/pager.c (disk_cache_block_ref): block cannot be negative.
* ext2fs: fix diskfs_pager_usersJustus Winter2014-05-261-1/+1
| | | | | | | This fixes a bug introduced in 86122789. * ext2fs/pager.c (diskfs_pager_users): We count file_pager_bucket, which does not include the disk pagers. Fix condition accordingly.