| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
libdiskfs' dosync goes through the cache to flush nodes to the disk.
We thus have to flush a node to the disk before removing it from the
cache in diskfs_try_dropping_softrefs.
|
|
|
|
|
| |
libdiskfs was passing its own proc port, thus confusing the fsys_init
call in rumpdisk.
|
|
|
|
|
|
|
|
|
|
|
| |
glibc 2.33 separated out _hurd_libc_proc_init from _hurd_init, so we
have to additionally call it.
* configure.ac (_hurd_libc_proc_init): Detect function.
* libdiskfs/boot-start.c (diskfs_S_fsys_init): Call
_hurd_libc_proc_init.
* libmachdev/trivfs_server.c (trivfs_S_fsys_init): Call
_hurd_libc_proc_init.
|
|
|
|
|
|
|
|
|
| |
When deadling with multiple levels of symlinks, we really need double
buffering between the current path and the symlink target, and thus cannot
reuse pathbuf.
* libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Always use alloca for
pathbuf.
|
|
|
|
|
|
|
|
|
| |
Like Linux does, to avoid writing inodes when just reading files already in
the cache.
* libdiskfs/init-init.c (_diskfs_relatime): Set to 1.
* libdiskfs/opts-std-runtime.c (set_opts): Always _diskfs_relatime from
h->relatime.
|
|
|
|
|
|
|
| |
Some tests (such as glibc's tst-atime) require it for instance.
* libdiskfs/node-times.c (atime_should_update): Also return 1 when atime
is equal to mtime or ctime.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/hurd.texi (diskfs_set_node_atime): Document relatime behavior.
* libdiskfs/diskfs.h (diskfs_set_node_atime): Likewise.
* libdiskfs/init-init.c (_diskfs_relatime): Add variable.
* libdiskfs/file-statfs.c (ST_RELATIME): Define if not defined already.
(diskfs_S_file_statfs): Report ST_RELATIME when _diskfs_relatime is set.
* libdiskfs/node-times.c (atime_should_update): New function.
(diskfs_set_node_atime): Document relatime behavior. Call
atime_should_update instead of reading _diskfs_noatime.
* libdiskfs/opts-common.c (diskfs_common_options): Add --strictatime and
-R/--relatime options.
* libdiskfs/opts-std-runtime.c (struct parse_hook): Add relatime field.
(set_opts): Set _diskfs_relatime from relatime field.
(parse_opt): Parse -R option.
* libdiskfs/opts-std-startup.c (parse_startup_opt): Parse -R option.
* libdiskfs/priv.h (_diskfs_relatime): Declare variable.
(atime_should_update): Declare function.
* libdiskfs/opts-append-std.c (diskfs_append_std_options): Add reporting
--relatime option.
* libdiskfs/conch-fetch.c (iohelp_fetch_shared_data): Call
atime_should_update instead of reading _diskfs_noatime.
* libdiskfs/rdwr-internal.c (_diskfs_rdwr_internal): Likewise.
|
|
|
|
| |
Message-Id: <20200728100837.224336-1-damien@zamaudio.com>
|
|
|
|
| |
Message-Id: <20200728100837.224336-2-damien@zamaudio.com>
|
|
|
|
|
|
|
| |
When we will have a rump translator before the root filesystem translator,
we will want to give to the former a control port on the latter.
Message-Id: <20200726073721.202405-1-damien@zamaudio.com>
|
| |
|
|
|
|
|
| |
fshelp_rlock_drop_peropen actually needs the node to be locked for
proper waiting atomicity.
|
|
|
|
|
|
|
|
| |
diskfs_make_peropen does not need node to be locked. Worse, it could try to
lock it.
* libdiskfs/file-reparent.c (diskfs_S_file_reparent): Do not lock node
around diskfs_make_peropen.
|
|
|
|
|
|
|
|
| |
* libdiskfs/io-pathconf.c (diskfs_S_io_pathconf): For
_PC_REC_MAX_XFER_SIZE, _PC_REC_INCR_XFER_SIZE, _PC_SYMLINK_MAX, return
undefined. For _PC_2_SYMLINKS, return 1. For _PC_REC_MIN_XFER_SIZE,
_PC_REC_XFER_ALIGN, _PC_ALLOC_SIZE_MIN, return page size.
* libnetfs/io-pathconf.c (netfs_S_io_pathconf): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which will be the default in gcc-10.
* acpi/acpifs.h (fs, acpifs_maptime): Add extern qualifier.
* boot/private.h (verbose): Likewise.
* eth-multiplexer/netfs_impl.h (multiplexer_maptime): Likewise.
* eth-multiplexer/vdev.h (port_bucket, vdev_portclass): Likewise.
* exec/priv.h (port_bucket, execboot_portclass): Likewise.
* ext2fs/ext2fs.h (sblock, sblock_dirty, block_size, log2_block_size,
log2_dev_blocks_per_fs_block, log2_stat_blocks_per_fs_block,
zeroblock, frag_size, frags_per_block, inodes_per_block,
itb_per_group, db_per_group, desc_per_block, addr_per_block,
groups_count, node_to_page_lock, generation_lock, next_generation,
group_desc_image, global_pokel, modified_global_blocks,
use_xattr_translator_records): Likewise.
* hostmux/hostmux.h (hostmux_maptime): Likewise.
* isofs/isofs.h (host_name, mounted_on, disk_image, disk_image_len,
logical_block_size, sblock): Likewise.
* libdiskfs/diskfs.h (diskfs_shortcut_symlink, diskfs_shortcut_chrdev,
diskfs_shortcut_blkdev, diskfs_shortcut_fifo, diskfs_shortcut_ifsock,
diskfs_create_symlink_hook, diskfs_read_symlink_hook): Likewise.
* libnetfs/callbacks.h (_netfs_translator_callback1,
_netfs_translator_callback2): Likewise.
* libnetfs/priv.h (netfs_mtime): Likewise.
* libpager/priv.h (_pager_class): Likewise.
* libtrivfs/trivfs.h (trivfs_check_access_hook, trivfs_check_open_hook,
trivfs_open_hook, trivfs_protid_create_hook, trivfs_peropen_create_hook,
trivfs_protid_destroy_hook, trivfs_peropen_destroy_hook,
trivfs_getroot_hook): Likewise.
* lwip/lwip-hurd.h (lwip_bucket, socketport_class, addrport_class,
shutdown_notify_class, lwip_protid_portclasses, lwip_cntl_portclasses,
lwip_bootstrap_portclass, fsys_identity, lwipcntl, lwip_owner,
lwip_group): Likewise.
* lwip/port/include/netif/hurdtunif.h (tunnel_cntlclass, tunnel_class):
Likewise.
* nfs/nfs.h (main_udp_socket, hostname, mapped_time): Likewise.
* nfsd/nfsd.h (mapped_time, authserver): Likewise.
* pci-arbiter/pcifs.h (fs, pcifs_maptime): Likewise.
* pci-arbiter/startup.h (pci_shutdown_notify_class,
arrange_shutdown_notification): Likewise.
* pfinet/pfinet.h (pfinet_bucket, addrport_class, socketport_class,
fsys_identity, pfinetctl, pfinet_owner, pfinet_group): Likewise.
* pflocal/sserver.h (sock_port_bucket): Likewise.
* proc/proc.h (authserver, self_proc, init_proc, startup_proc, proc_bucket,
proc_class, generic_port_class, exc_class, generic_port, kernel_proc,
global_lock): Likewise.
* term/term.h (termstate, termflags, global_lock, carrier_alert,
select_alert, pty_select_alert, term_bucket, tty_cntl_class,
tty_class, cttyid_class, pty_class, pty_cntl_class, termctl, ptyctl,
inputq, rawq, outputq, remote_input_mode, external_processing,
term_owner, term_group, term_mode, bottom): Likewise.
* usermux/usermux.h (usermux_maptime): Likewise.
* utils/msgids.h (msgid_argp): Likewise.
* libdiskfs/priv.h (_diskfs_mtime): Remove definition.
* lwip/options.h (lwip_argp): Add prototype.
* mach-defpager/priv.h (partitions): Name structure.
(all_partitions): Add extern qualifier.
* acpi/main.c (acpifs_maptime, fs): New variables.
* exec/main.c (port_bucket, execboot_portclass): Likewise.
* ext2fs/ext2fs.c (sblock, sblock_dirty, block_size, log2_block_size,
log2_dev_blocks_per_fs_block, log2_stat_blocks_per_fs_block,
frag_size, frags_per_block, inodes_per_block, itb_per_group,
db_per_group, desc_per_block, addr_per_block, groups_count,
next_generation, group_desc_image, global_pokel,
use_xattr_translator_records): Likewise.
* isofs/main.c (host_name, mounted_on, logical_block_size, sblock):
Likewise.
* libpager/pager-create.c (_pager_class): Likewise.
* lwip/port/netif/hurdtunif.c (tunnel_cntlclass, tunnel_class):
Likewise.
* mach-defpager/default_pager.c (all_partitions): Likewise.
* nfs/main.c (main_udp_socket, hostname, mapped_time): Likewise.
* nfsd/main.c (mapped_time, authserver): Likewise.
* pci-arbiter/main.c (fs, pcifs_maptime): Likewise.
* pci-arbiter/startup.c (*pci_shutdown_notify_class): Likewise.
* pfinet/main.c (pfinetctl, pfinet_owner, pfinet_group, pfinet_bucket,
addrport_class, socketport_class, fsys_identity): Likewise.
* proc/main.c (authserver, self_proc, init_proc, startup_proc,
proc_bucket, proc_class, generic_port_class, exc_class, generic_port,
kernel_proc, global_lock): Likewise.
* term/main.c (termstate, termflags, global_lock, carrier_alert,
select_alert, pty_select_alert, term_bucket, tty_cntl_class,
tty_class, cttyid_class, pty_class, pty_cntl_class, termctl, ptyctl,
outputq, remote_input_mode, external_processing, term_owner,
term_group, term_mode, bottom): Likewise.
* usermux/usermux.c (usermux_mapped_time): Rename to usermux_maptime.
* lwip/main.c: Include "options.h".
(lwip_argp, netif_list): Remove declarations.
(lwip_bucket, socketport_class, addrport_class, shutdown_notify_class,
lwip_cntl_portclasses, lwip_bootstrap_portclass, lwip_owner, lwip_group,
fsys_identity, lwipcntl): New variables.
* eth-multiplexer/multiplexer.c (multiplexer_maptime): Add variable.
* hostmux/hostmux.c (hostmux_mapped_time): Rename variable to hostmux_maptime
* libdiskfs/extra-version.c: Rename file to...
* libdiskfs/priv.c: ... new file.
(diskfs_shortcut_symlink, diskfs_shortcut_chrdev,
diskfs_shortcut_blkdev, diskfs_shortcut_fifo, diskfs_shortcut_ifsock,
diskfs_create_symlink_hook, diskfs_read_symlink_hook): Add weak
variables.
* libdiskfs/Makefile (OTHERSRCS): Replace extra-version.c with priv.c.
* libtrivfs/priv.c: New file.
* libtrivfs/Makefile (OTHERSRCS): Add priv.c
* libcons/extra-version.c: Rename file to...
* libcons/priv.c: ... new file.
* libcons/Makefile (SRCS): Replace extra-version.c with priv.c.
Fix build with #
|
|
|
|
|
|
| |
* libfshelp/fshelp.h (fshelp_rlock_po_fini): New inline function.
* libdiskfs/peropen-rele.c (diskfs_release_peropen): Call fshelp_rlock_po_fini.
* libnetfs/release-peropen.c (netfs_release_peropen): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2019-03-04 Svante Signell <svante.signell@gmail.com>
* file-lock.c: Make flock work regardless of the
mode in which the file was opened.
2019-02-12 Svante Signell <svante.signell@gmail.com>
* file-lock.c: Comment out "Make flock work without R or W mode"
2019-02-01 Svante Signell <svante.signell@gmail.com>
* Update copyright years.
* file-record-lock.c(diskfs_S_file_record_lock):
Don't set rendezvous to MACH_PORT_NULL.
2018-12-07 Svante Signell <svante.signell@gmail.com>
* Update copyright years.
* dir-lookup.c(diskfs_S_dir_lookup): Call fshelp_rlock_tweak()
with new last argument rendezvous = MACH_PORT_NULL.
* file-lock.c(diskfs_S_file_lock): Likewise.
* file-record-lock.c(diskfs_S_file_record_lock): Likewise.
(diskfs_S_file_record_lock): Add new argument mach_port_t rendezvous.
2017-01-05 Svante Signell <svante.signell@gmail.com>
* Update copyright years and headers.
2016-05-23 Svante Signell <svante.signell@gmail.com>
* file-lock-stat.c: Port from cthreads to libpthread.
* file-lock.c: Likewise.
* file-record-lock: Likewise.
2001-04-11 Neal H Walfield <neal@cs.uml.edu>
* Makefile (FSSRCS): Add file-record-lock.c.
* diskfs.h (struct peropen): Change the type of lock_status
from an int to a struct rlock_peropen.
(struct node): Change the type of userbox from a struct lock_box
to a struct rlock_box.
* dir-lookup.c (diskfs_S_dir_lookup): Use fshelp_rlock_tweak
as fshelp_acquire_lock is now depreciated.
* file-lock-stat.c (diskfs_S_file_lock_stat): Total rewrite
around the new record locking functions.
* file-lock.c (diskfs_S_file_lock): Total rewrite around the
new record locking functions.
* file-record-lock.c: New file. Implement
diskfs_S_file_record_lock.
* node-make.c (diskfs_make_node): Initialize userbox with
fshelp_rlock_init.
* peropen-make.c (diskfs_make_peropen): Initialize lock_status
using fshelp_rlock_po_init.
* peropen-rele.c (diskfs_release_peropen): Release lock_status
using fshelp_rlock_drop_peropen.
|
|
|
|
|
| |
* libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Remove duplicate
variable.
|
|
|
|
|
|
| |
* libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Do not call
fshelp_set_active_translator if fshelp_fetch_root returned an error
which is not ENOENT.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* boot/boot.c: Replace char* with data_t.
* console-client/trans.c: Likewise.
* exec/exec.c: Likewise.
* ext2fs/storeinfo.c: Likewise.
* fatfs/inode.c: Likewise.
* fatfs/main.c: Likewise.
* isofs/inode.c: Likewise.
* libdiskfs/boot-start.c: Likewise.
* libdiskfs/dir-readdir.c: Likewise.
* libdiskfs/file-exec.c: Likewise.
* libdiskfs/file-get-fs-opts.c: Likewise.
* libdiskfs/file-get-trans.c: Likewise.
* libdiskfs/file-getfh.c: Likewise.
* libdiskfs/file-set-trans.c: Likewise.
* libdiskfs/fsys-forward.c: Likewise.
* libdiskfs/fsys-getfile.c: Likewise.
* libdiskfs/fsys-options.c: Likewise.
* libdiskfs/io-read.c: Likewise.
* libdiskfs/io-write.c: Likewise.
* libnetfs/dir-readdir.c: Likewise.
* libnetfs/file-exec.c: Likewise.
* libnetfs/file-get-fs-options.c: Likewise.
* libnetfs/file-get-storage-info.c: Likewise.
* libnetfs/file-get-translator.c: Likewise.
* libnetfs/file-set-translator.c: Likewise.
* libnetfs/fsstubs.c: Likewise.
* libnetfs/fsys-get-options.c: Likewise.
* libnetfs/fsys-set-options.c: Likewise.
* libnetfs/fsysstubs.c: Likewise.
* libnetfs/io-read.c: Likewise.
* libnetfs/io-write.c: Likewise.
* libtrivfs/dir-readdir.c: Likewise.
* libtrivfs/file-get-fs-options.c: Likewise.
* libtrivfs/file-get-storage-info.c: Likewise.
* libtrivfs/file-get-trans.c: Likewise.
* libtrivfs/file-getfh.c: Likewise.
* libtrivfs/file-set-trans.c: Likewise.
* libtrivfs/fsys-forward.c: Likewise.
* libtrivfs/fsys-get-options.c: Likewise.
* libtrivfs/fsys-set-options.c: Likewise.
* libtrivfs/fsys-stubs.c: Likewise.
* libtrivfs/io-read.c: Likewise.
* libtrivfs/io-write.c: Likewise.
* pfinet/io-ops.c: Likewise.
* pfinet/pfinet-ops.c: Likewise.
* pfinet/socket-ops.c: Likewise.
* pfinet/tunnel.c: Likewise.
* pflocal/io.c: Likewise.
* pflocal/pf.c: Likewise.
* pflocal/socket.c: Likewise.
* proc/info.c: Likewise.
* startup/startup.c: Likewise.
* storeio/io.c: Likewise.
* term/users.c: Likewise.
* tmpfs/node.c: Likewise.
* trans/crash.c: Likewise.
* trans/fakeroot.c: Likewise.
* trans/fifo.c: Likewise.
* trans/firmlink.c: Likewise.
* trans/hello-mt.c: Likewise.
* trans/hello.c: Likewise.
* trans/mtab.c: Likewise.
* trans/new-fifo.c: Likewise.
* trans/null.c: Likewise.
* trans/proxy-defpager.c: Likewise.
* trans/streamio.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libdiskfs/diskfs.h (protid_t): New type
(diskfs_S_io_write, diskfs_S_io_read, diskfs_S_io_seek,
diskfs_S_io_stat, diskfs_S_file_set_size,
diskfs_S_file_get_storage_info, diskfs_S_file_statfs): New prototypes.
* libnetfs/netfs.h (netfs_S_io_write, netfs_S_io_read, netfs_S_io_seek,
netfs_S_io_stat, netfs_S_file_set_size, netfs_S_file_get_storage_info,
netfs_S_file_statfs): New prototypes.
* libtrivfs/trivfs.h (trivfs_S_io_write, trivfs_S_io_read,
trivfs_S_io_seek, trivfs_S_io_stat, trivfs_S_file_set_size,
trivfs_S_file_get_storage_info, trivfs_S_file_statfs): New prototypes.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* isofs/rr.c: Include <sys/sysmacros.h>.
* libdiskfs/file-set-trans.c: Likewise.
* libfshelp/fetch-root.c: Likewise.
* libnetfs/file-get-translator.c: Likewise.
* libnetfs/file-set-translator.c: Likewise.
* nfs/nfs.c: Likewise.
* nfs/ops.c: Likewise.
* storeio/storeio.c: Likewise.
* trans/fakeroot.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We build hurd with LFS64, so we should always expose LFS64 types, so callers
do not have to build with -D_FILE_OFFSET_BITS=64.
* libdiskfs/diskfs.h (struct peropen): Make `filepointer' field type
`loff_t' instead of `off_t'.
(diskfs_cached_ifind): Make `inum' parameter `ino64_t' instead of
`ino_t'.
(diskfs_cached_lookup_context): Likewise.
* hurd/shared.h (strcut shared_io): Make `read_size', `prenotify_size',
`postnotify_size', `readnotify_size', `rd_file_pointer',
`wr_file_pointer', `xx_file_pointer', `file_size' fields type `loff_t'
instead of `off_t'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Starting from coreutils 8.30 which uses
renameat2(flag=RENAME_NOREPLACE), we need to have excl=1 to behave
correctly, notably in this case:
$ mkdir a
$ mkdir b
$ touch b/t
$ mv b a
diskfs_rename("b", "a", excl=1) called by mv shall return EEXIST.
* libdiskfs/diskfs.h (diskfs_rename_dir): Add `excl' parameter.
* doc/hurd.texi (diskfs_rename_dir): Document `excl' parameter.
* libdiskfs/dir-renamed.c (diskfs_rename_dir): Add `excl' parameter.
Return EEXIST when target exists and `excl' is not 0.
* libdiskfs/dir-rename.c (diskfs_S_dir_rename): Pass `excl' to
diskfs_rename_dir.
|
|
|
|
|
|
|
| |
POSIX requires ELOOP in that case.
* libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Return ELOOP instead of
EACCES when the result is a symlink and O_WRITE|O_EXEC was requested
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* isofs/rr.c (rrip_work): Use gnu_dev_makedev instead of makedev.
* libdiskfs/file-set-trans.c (diskfs_S_file_set_translator): Likewise.
* libnetfs/file-set-translator.c (netfs_S_file_set_translator):
Likeiwse.
* nfs/nfs.c (xdr_decode_fattr): Likewise.
* storeio/storeio.c (parse_opt): Likewise.
* libfshelp/fetch-root.c (fshelp_short_circuited_callback1): Use
gnu_dev_major and gnu_dev_minor instead of major and minor.
* libnetfs/file-get-translator.c (netfs_S_file_get_translator):
Likewise.
* nfs/ops.c (netfs_attempt_link): Likewise.
* storeio/storeio.c (trivfs_append_args): Likewise.
* trans/fakeroot.c (netfs_attempt_mkdev): Likewise.
* pfinet/glue-include/linux/mm.h: Include <mach/vm_param.h>.
* term/users.c: Include <signal.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and update the servers to use UTIME_NOW and UTIME_OMIT.
* console-client/trans.c (netfs_attempt_utimes): Do not set current time
ourself.
* console/console.c (netfs_attempt_utimes): Likewise.
* ftpfs/netfs.c (netfs_attempt_utimes): Likewise.
* hostmux/node.c (netfs_attempt_utimes): Likewise.
* usermux/node.c (netfs_attempt_utimes): Likewise.
* nfs/ops.c (netfs_attempt_utimes): Likewise.
* doc/hurd.texi (file_utimens): Add documentation.
* hurd/fs.defs (file_utimens): Add RPC.
* libdiskfs/file-utimes.c (diskfs_S_file_utimes): Move implementation
and replace with translation layer with...
(diskfs_S_file_utimens): ... new function.
* libnetfs/file-utimes.c (netfs_S_file_utimes): Likewise with...
(netfs_S_file_utimens): ... new function.
* libnetfs/init-init.c: Include <error.h>.
(netfs_mtime): New variable.
(netfs_init): New function.
* libnetfs/netfs.h (netfs_attempt_utimes): Update documentation.
* libnetfs/priv.h (netfs_mtime): Declare variable.
* libtreefs/s-file.c (treefs_S_file_utimes): Convert time values and
call treefs_s_file_utimens instead of treefs_s_file_utimes.
* libtreefs/treefs-hooks.h: Replace TREEFS_HOOK_S_FILE_UTIMES with
TREEFS_HOOK_S_FILE_UTIMENS.
* libtreefs/treefs-s-hooks.h: Replace s_file_utimes with s_file_utimens.
* libtrivfs/file-utimes.c (trivfs_S_file_utimens): New function.
* libtrivfs/times.c (trivfs_set_atime): Try to use file_utimens before
using file_utimes.
(trivfs_set_mtime): Likewise.
* nfsd/ops.c (complete_setattr): Likewise.
* trans/fakeroot.c (netfs_attempt_utimes): Likewise.
* nfs/nfs.c (xdr_encode_sattr_times): Do not set atime or mtime when
they are NULL.
* configure.ac: Look for file_futimens, and define UTIME_NOW/OMIT, for
compatibility with old glibcs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libdiskfs/boot-start.c (diskfs_start_bootstrap): Fix printf format.
* libfshelp/delegate.c: Include <alloca.h> and <stdlib.h>.
* libfshelp/start-translator-long.c: Include <stdlib.h>.
* libshouldbeinlibc/ugids-verify-auth.c (server_verify_make_auth): Fix
prototypes for password_check_group and password_check_user.
* libstore/argp.c: Include <stdlib.h>.
* libstore/task.c: Include <stdlib.h>.
* exec/exec.c: Include <mach/vm_param.h>.
* libbpf/bpf_impl.c: Include <stdlib.h>.
* proc/info.c (S_proc_getloginpids): Remove local variables leader_task
and leader_sub.
* proc/main.c (main): Remove local variable original_argv.
* boot/boot.c (task_died, S_mach_notify_new_task): Fix printf format.
* exec/elfcore.c: Include <alloca.h> and <mach/vm_param.h>.
* trans/crash.c: Include <hurd/msg.h>.
* trans/random.c: Include <signal.h>.
* utils/login.c: Include <signal.h>.
* utils/id.c: Include <hurd/msg.h>.
* utils/devprobe.c: Include <stdlib.h>.
* utils/addauth.c: Include <hurd/msg.h>.
* utils/frobauth-mod.c: Include <hurd/msg.h>.
* utils/storeread.c: Include <stdlib.h>.
* utils/msgport.c: Include <hurd/msg.h>.
* sutils/clookup.c (file_name_lookup_carefully): Fix lookup function
prototype, make head and tail const.
* utils/rpcscan.c: Include <stdlib.h>.
* sutils/bless.c: Include <stdlib.h>.
* fstests/fstests.c: Include <stdlib.h>.
* startup/startup.c (argz_task_insert_right): Fix printf format.
* init/init.c: Include <stdlib.h>.
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 89a49ec8b3a847f3b770cff6a4a80b98b94ad7bf.
There was a typo in diskfs_shutdown (FSYS_GOAWAY_FORCE || FSYS_GOAWAY_RECURSE)
which was making it FSYS_GOAWAY_NOWAIT, and thus not actually syncing if
there happens to be clients (it was then returning EBUSY). Fixing this into
FSYS_GOAWAY_FORCE | FSYS_GOAWAY_RECURSE then makes it wait for clients (and
NOWAIT is not supported), and there are very often some left, thus not
syncing either.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* hurd/fs.defs (file_exec): Deprecate in favor of...
(file_exec_paths): ...this new RPC.
* TODO: Update.
* doc/hurd.texi: Update RPC name.
* hurd/hurd_types.h: Update RPC name.
* libdiskfs/boot-start.c: Update RPC name.
* configure.ac: Check for presence of RPC stubs file_exec_paths exec_exec_paths.
* exec/hashexec.c (check_hashbang): When file_exec_paths is available, use it
instead of file_exec.
* startup/startup.c (run, run_for_real, start_child): Likewise.
* utils/login.c (main): Likewise.
* libfshelp/start-translator-long.c (fshelp_start_translator_long): Likewise.
* libdiskfs/file-exec.c (diskfs_S_file_exec): Move code to
new function diskfs_S_file_exec_paths and call it.
(diskfs_S_file_exec_paths): New function, use exec_exec_paths when available
instead of exec_exec
* libnetfs/file-exec.c (netfs_S_file_exec, netfs_S_file_exec_paths): Likewise.
* trans/fakeroot.c (netfs_S_file_exec, netfs_S_file_exec_paths): Likewise.
* libtrivfs/file-exec.c (trivfs_S_file_exec_paths): New function.
|
|
|
|
|
| |
* libdiskfs/init-main.c (diskfs_init_main): Use name of the function
that failed as error message.
|
|
|
|
|
|
|
|
|
| |
* libdiskfs/init-startup.c (diskfs_S_startup_dosync): Simplify the
code by just using 'diskfs_shutdown' with the force flag. This also
shuts down pagers, which potentially affects other tasks, but getting
rid of the pagers allows us to commit a clean and consistent state to
the disk before shutting down. Crashing other tasks just before the
system powers down seems like a small price to pay.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we used the fs protocol to traverse the translator
hierarchies. This, however, is conceptually flawed, because
translators are bound to nodes, and a node can have zero or more links
in the file system. Therefore, the previous method of returning a
list of paths to the client and expecting them to be able to follow
these to reach the child translators was always unreliable.
Fix this by using the fsys protocol to traverse the hierarchy, and
returning the control ports of all children. This is more robust, and
also conceptually cleaner, because the fsys protocol is about
translator linkage, hence this is the point to implement traversal.
Also move the get source routine over. A per-node source really
does not fit the reality of most translators, while a per-translator
source makes sense in many cases.
* hurd/fs.defs (file_get_children): Drop routine.
(file_get_source): Likewise.
* hurd/fsys.defs (fsys_get_children): New routine.
(fsys_get_source): Likewise.
* libdiskfs/Makefile (FSYSSRCS): Remove files, add files.
* libdiskfs/file-get-children.c: Remove file.
* libdiskfs/fsys-get-children.c: New file.
* libdiskfs/file-get-source.c: Remove file.
* libdiskfs/fsys-get-source.c: New file.
* libfshelp/fshelp.h (fshelp_filter): Remove type.
(fshelp_get_active_translators): Remove filter and prefix argument,
return list of control ports.
* libfshelp/translator-list.c (fshelp_get_active_translators):
Likewise.
* libnetfs/Makefile (FSSRCS): Move 'get-source.c' too OTHERSRCS.
(FSYSSRCS): Remove files, add files.
* libnetfs/file-get-children.c: Remove file.
* libnetfs/fsys-get-children.c: New file.
* libnetfs/file-get-source.c: Remove file.
* libnetfs/fsys-get-source.c: New file.
* libtrivfs/Makefile: Move 'get-source.c' too OTHERSRCS.
(FSYSSRCS): Remove files, add files.
* libtrivfs/file-get-children.c: Remove file.
* libtrivfs/fsys-get-children.c: New file.
* libtrivfs/file-get-source.c: Remove file.
* libtrivfs/fsys-get-source.c: Add file.
* trans/Makefile (mtab): Build client stubs until the libc has caught
on.
* trans/mtab.c (target_control): New variable.
(insecure): Drop variable.
(all_translators): Likewise.
(MAX_DEPTH): New macro.
(max_depth): New variable.
(options): Remove '--insecure' and '--all-translators', add '--depth'.
(parse_opt): Adapt accordingly.
(trivsfs_append_args): Likewise.
(main): Get the control port of the target translator, then drop
privileges.
(is_filesystem_translator): Remove function.
(mtab_mark_as_seen): Simplify. Just check if the control port is
known.
(mtab_populate): Limit depth of recursion, adapt to traversing over
the control ports, simplify.
(open_hook): Remove scary comment, it is not applicable anymore
because we no longer dir_lookup child translators.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, libfshelp used the name of an translator as key in the
hash table. This however is flawed, because a translator is bound to
a node, and a node can have zero or more links in the file system.
Use the nodes address (or rather, the address of the transbox embedded
in the node) as key instead.
* libfshelp/fshelp.h (fshelp_set_active_translator): Instead of the
control port, hand the whole transbox to the function.
* libfshelp/translator-list.c (struct translator): New field 'locp'.
(hash): Hash pointer.
(compare): Compare pointer.
(translator_ihash): Use an location pointer.
(fshelp_set_active_translator): Use the address of the transbox as key.
(fshelp_remove_active_translator): Remove using the location pointer.
* libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Fix callsite.
* libdiskfs/file-set-trans.c (diskfs_S_file_set_translator): Likewise.
* libnetfs/dir-lookup.c (netfs_S_dir_lookup): Likewise.
* libnetfs/file-set-translator.c (netfs_S_file_set_translator):
Likewise.
|
|
|
|
|
|
| |
* libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Strip trailing
slashes.
* libnetfs/dir-lookup.c (netfs_S_dir_lookup): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libdiskfs/file-syncfs.c (diskfs_S_file_syncfs): Use the new function.
* libdiskfs/fsys-options.c (diskfs_S_fsys_set_options): Likewise.
* libdiskfs/fsys-syncfs.c (diskfs_S_fsys_syncfs): Likewise.
* libdiskfs/shutdown.c (diskfs_shutdown): Likewise.
* libfshelp/fshelp.h (fshelp_map_active_translators): New declaration.
* libfshelp/translator-list.c (fshelp_map_active_translators): New
function.
* libnetfs/file-syncfs.c (netfs_S_file_syncfs): Use the new function.
* libnetfs/fsys-set-options.c (netfs_S_fsys_set_options): Likewise.
* libnetfs/fsys-syncfs.c (netfs_S_fsys_syncfs): Likewise.
* libnetfs/shutdown.c (netfs_shutdown): Likewise.
|
|
|
|
|
|
|
| |
* libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Unconditionally
register translators. Previously, we missed translators because
'transbox.active' is not in fact reset if the translator dies.
* libnetfs/dir-lookup.c (netfs_S_dir_lookup): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libdiskfs/diskfs.h (diskfs_get_source): Remove first parameter.
* libdiskfs/file-get-source.c (diskfs_S_file_get_source): Adapt
callsite.
* libdiskfs/get-source.c (diskfs_get_source): Adapt default
implementation.
* libnetfs/netfs.h (netfs_get_source): Remove first parameter.
* libnetfs/file-get-source.c (netfs_S_file_get_source): Adapt
callsite.
* libnetfs/get-source.c (netfs_get_source): Adapt default
implementation.
* libtrivfs/trivfs.h (trivfs_get_source): Remove first parameter.
* libtrivfs/file-get-source.c (trivfs_S_file_get_source): Adapt
callsite.
* libtrivfs/get-source.c (trivfs_get_source): Adapt default
implementation.
* nfs/main.c (netfs_get_source): Adapt implementation.
* procfs/main.c (netfs_get_source): Likewise.
* trans/firmlink.c (trivfs_get_source): Likewise.
|
|
|
|
|
|
|
|
|
| |
* libdiskfs/diskfs.h (diskfs_begin_using_control_port): Check port class.
* libdiskfs/fsys-getfile.c (diskfs_S_fsys_getfile): Drop check.
* libdiskfs/fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
* libdiskfs/fsys-goaway.c (diskfs_S_fsys_goaway): Likewise.
* libdiskfs/fsys-options.c (diskfs_S_fsys_{s,g}et_options): Likewise.
* libdiskfs/fsys-syncfs.c (diskfs_S_fsys_syncfs): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libdiskfs/boot-start.c (bootinfo): New variable.
(diskfs_start_bootstrap): Create 'bootinfo' as an instance of
'diskfs_control_class'.
(diskfs_S_fsys_getpriv): Only allow operation on 'bootinfo'.
(diskfs_S_fsys_init): Allow operation on any control object, but only
once.
* libdiskfs/diskfs.h (diskfs_initboot_class): Drop declaration.
* libdiskfs/init-init.c (diskfs_initboot_class): Drop variable.
(diskfs_init_diskfs): Adapt.
|
|
|
|
|
| |
* libdiskfs/init-init.c (diskfs_init_diskfs): First try /dev/time,
then fall back to the Mach device.
|
|
|
|
|
| |
Our variants print stack traces on failures. This will make locating
errors much easier.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the early server bootstrap relied upon a specific task
layout to determine the kernels task port. Explicitly pass it from
the kernel instead.
* boot/boot.c (default_boot_script): Add '--kernel-task' parameter to
ext2fs.
(main): New bootscript variable 'kernel-task'.
* libdiskfs/boot-start.c (diskfs_kernel_task): Declaration variable.
(diskfs_start_bootstrap): If '--kernel-task' was given to us, pass it
along to startup.
* libdiskfs/opts-std-startup.c (diskfs_kernel_task): New variable.
(startup_options): Add '--kernel-task' option.
(parse_startup_opt): Handle option.
* proc/main.c (kernel_task): New variable.
(OPT_KERNEL_TASK): New macro.
(options): New variable.
(parse_opt): New function.
(main): Parse options. Use 'kernel_task' if provided.
* release/servers.boot: Add '--kernel-task' parameter to ext2fs.
* startup/startup.c (OPT_KERNEL_TASK): New macro.
(options): Add '--kernel-task' option.
(kernel_task): New variable.
(insert_ports_fnc_t): New declaration.
(run): Add argument for a function that inserts rights into the newly
created task and adds arguments to the argument vector.
(argz_task_insert_right): New function.
(proc_insert_ports): Likewise.
(parse_opt): New function.
(main): Pass the kernel's task port to proc.
(frob_kernel_process): Use the kernel's task port.
|
|
|
|
|
|
|
|
| |
* libdiskfs/node-lastref.c: New file
* libdiskfs/Makefile (OTHERSRCS): Add node-lastref.c
* libdiskfs/libdiskfs/node-nput.c (diskfs_nput): Replace last hard reference
code with a call to _diskfs_lastref.
* libdiskfs/node-nrele.c (diskfs_nrele): Likewise.
|
|
|
|
|
|
|
|
| |
Follow-up on 5ab5d98fa515cd19a64e8d5868fcbae85eec9dc5 ('libdiskfs: fix
removal of socket nodes'), for diskfs_nrele.
* libdiskfs/node-nrele.c (diskfs_nrele): Deallocate right to socket
address when cleaning light references.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So that static linking of e.g. console.static can work.
* libdiskfs/io-stubs.c (diskfs_S_io_readsleep, diskfs_S_io_eofnotify,
diskfs_S_io_postnotify, diskfs_S_io_readnotify): Mark weak.
* libnetfs/fsstubs.c (netfs_S_file_notice_changes, netfs_S_file_getfh,
netfs_S_ifsock_getsockaddr): Likewise.
* libnetfs/fsysstubs.c (netfs_S_fsys_getfile: netfs_S_fsys_getpriv,
netfs_S_fsys_init, netfs_S_fsys_forward, netfs_S_fsys_startup):
Likewise.
* libpager/stubs.c (_pager_S_memory_object_copy,
_pager_S_memory_object_data_write,
_pager_S_memory_object_supply_completed): Likewise.
* libtrivfs/fsys-stubs.c (trivfs_S_fsys_startup, trivfs_S_fsys_getpriv,
trivfs_S_fsys_init, trivfs_S_fsys_getfile): Likewise.
* libtrivfs/io-stubs.c (trivfs_S_io_map_cntl, trivfs_S_io_get_conch,
trivfs_S_io_release_conch, trivfs_S_io_eofnotify, trivfs_S_io_prenotify,
trivfs_S_io_postnotify, trivfs_S_io_readsleep, trivfs_S_io_sigio,
trivfs_S_io_readnotify): Likewise.
|
|
|
|
|
|
|
| |
Thanks Kalle Olavi Niemitalo for the notice.
* libdiskfs/file-utimes.c (diskfs_S_file_utimes): Call diskfs_set_node_times
before setting node timestamps.
|
|
|
|
|
| |
* libdiskfs/node-nrele.c (diskfs_nrele): Call diskfs_set_node_times when
there are no hard refs any more, like diskfs_nput does.
|
|
|
|
|
|
|
|
|
| |
* libdiskfs/file-set-trans.c (diskfs_S_file_set_translator): When
setting a short-circuited translator, clear the translator record
first. Improve error handling.
This notably fixes a crash in ext2fs when setting a symlink on a node
with an existing translator record.
|
|
|
|
|
|
|
|
| |
It is just a warning, not a fatal error.
* libdiskfs/init-startup.c (_diskfs_init_completed): Prefix warning about
requesting shutdown nofication with "warning:".
* random/random.c (main): Likewise.
|