Re: Atomic file locking update

2014-11-27 Thread Samuel Thibault
Svante Signell, le Thu 27 Nov 2014 19:25:54 +0100, a écrit : > On Thu, 2014-11-27 at 15:56 +0100, Samuel Thibault wrote: > > Svante Signell, le Thu 27 Nov 2014 13:49:53 +0100, a écrit : > > > As discussed on IRC too, AIUI the record locking patches just get rid > > of the whole content that I'm pa

Re: [PATCH hurd 03/30] Revert "random: fix a receiver lookup"

2014-11-27 Thread Samuel Thibault
Justus Winter, le Thu 27 Nov 2014 14:18:43 +0100, a écrit : > This reverts "8927fbd63e29005ddb9b2c2264046089bf669857". > > The change mistakenly adds mutators for the `startup' protocol, but > the server routine is for the `startup_notify' protocol. Ack. > --- > random/Makefile | 1 - > ra

Re: Atomic file locking update

2014-11-27 Thread Svante Signell
On Thu, 2014-11-27 at 15:56 +0100, Samuel Thibault wrote: > Svante Signell, le Thu 27 Nov 2014 13:49:53 +0100, a écrit : > As discussed on IRC too, AIUI the record locking patches just get rid > of the whole content that I'm patching. So the rebase should be quite > trivial: just tell git to keep

Re: [PATCH hurd 02/30] include: force all refcount functions to be inlined

2014-11-27 Thread Samuel Thibault
Justus Winter, le Thu 27 Nov 2014 14:18:42 +0100, a écrit : > * include/refcount.h: Declare all functions `extern inline' instead of > `static inline'. This forces those functions to be inlined, Well, actually no. The compiler is still allowed not to inline them, and that turns them into external

Re: [PATCH hurd 01/30] proc: fix NULL dereference

2014-11-27 Thread Samuel Thibault
Justus Winter, le Thu 27 Nov 2014 14:18:41 +0100, a écrit : > This also restores the behavior before e9687ec4. > > * proc/notify.c (do_mach_notify_dead_name): Fix NULL dereference. I had actually already commited the same :) > --- > proc/notify.c | 7 --- > 1 file changed, 4 insertions(+),

Re: [PATCH gnumach] include: make `mach_port_t' payload-aware

2014-11-27 Thread Samuel Thibault
Justus Winter, le Thu 27 Nov 2014 14:16:19 +0100, a écrit : > Honor a new macro `MACH_PAYLOAD_TO_PORT' to inject a translation > function mapping payloads to port names in the definition of > `mach_port_t'. Ack. > * include/mach/std_types.defs (mach_port_t): Honor > `MACH_PAYLOAD_TO_PORT'. > * in

Re: Atomic file locking update

2014-11-27 Thread Samuel Thibault
Svante Signell, le Thu 27 Nov 2014 13:49:53 +0100, a écrit : > As discussed on #debian-hurd IRC, these changes are conflicting with the > record file locking patches. When you upgrade Hurd again, I need to > rebase these patches another time. As discussed on IRC too, AIUI the record locking patche

[PATCH hurd 07/30] libnetfs: add a payload-aware intrans function

2014-11-27 Thread Justus Winter
* libnetfs/priv.h (begin_using_protid_payload): New function. * libnetfs/mutations.h: Add mutator. --- libnetfs/mutations.h | 3 +++ libnetfs/priv.h | 6 ++ 2 files changed, 9 insertions(+) diff --git a/libnetfs/mutations.h b/libnetfs/mutations.h index e60a220..088d8a0 100644 --- a/libne

[PATCH hurd-dde 2/4] eth-filter: add payload-aware intrans functions

2014-11-27 Thread Justus Winter
* eth-filter/mig-mutate.h: Add mutators. * eth-filter/mig-decls.h (begin_using_device_payload): New function. --- eth-filter/mig-decls.h | 6 ++ eth-filter/mig-mutate.h | 4 2 files changed, 10 insertions(+) diff --git a/eth-filter/mig-decls.h b/eth-filter/mig-decls.h index 0bb29a6..a3f

[PATCH hurd-dde 1/4] devnode: add a payload-aware intrans function

2014-11-27 Thread Justus Winter
* devnode/mig-mutate.h: Add mutator. * devnode/Makefile (device-MIGSFLAGS): Define MACH_PAYLOAD_TO_PORT. --- devnode/Makefile | 1 + devnode/mig-mutate.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/devnode/Makefile b/devnode/Makefile index d9a9c23..9529fa7 100644 --- a/devnode/Makef

[PATCH hurd-dde 3/4] eth-multiplexer: add payload-aware intrans functions

2014-11-27 Thread Justus Winter
* eth-multiplexer/mig-mutate.h: Add mutators. * eth-multiplexer/mig-decls.h (begin_using_device_payload): New function. * eth-multiplexer/Makefile (device-MIGSFLAGS): Define MACH_PAYLOAD_TO_PORT. --- eth-multiplexer/Makefile | 1 + eth-multiplexer/mig-decls.h | 6 ++ eth-multiplexer/mig-m

[PATCH hurd 28/30] libports: use protected payloads to optimize the object lookup

2014-11-27 Thread Justus Winter
* libports/create-internal.c (_ports_create_port_internal): Set the protected payload to the objects address. * libports/import-port.c (ports_import_port): Likewise. * libports/reallocate-from-external.c (ports_reallocate_from_external): Likewise. * libports/reallocate-port.c (ports_reallocate_port

[PATCH hurd 30/30] mach-defpager: fix build

2014-11-27 Thread Justus Winter
--- mach-defpager/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mach-defpager/Makefile b/mach-defpager/Makefile index 09debed..ed115bd 100644 --- a/mach-defpager/Makefile +++ b/mach-defpager/Makefile @@ -27,7 +27,7 @@ SRCS := default_pager.c kalloc.c wiring.c main.c

[PATCH hurd 21/30] trans/fakeroot: make the demuxer payload-aware

2014-11-27 Thread Justus Winter
* trans/fakeroot.c (netfs_demuxer): Make the demuxer payload-aware. --- trans/fakeroot.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/trans/fakeroot.c b/trans/fakeroot.c index df2de64..12173bd 100644 --- a/trans/fakeroot.c +++ b/trans/fakeroot.c @@ -964,9

[PATCH hurd 17/30] pflocal: add payload-aware intrans functions

2014-11-27 Thread Justus Winter
* pflocal/mig-mutate.h: Add mutators. * pflocal/mig-decls.c (begin_using_sock_user_payload): New function. (begin_using_addr_payload): Likewise. --- pflocal/mig-decls.h | 12 pflocal/mig-mutate.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/pflocal/mig-decls.h b/pflocal/

[PATCH hurd 24/30] trans/streamio: make the translator payload-aware

2014-11-27 Thread Justus Winter
* trans/Makefile (device_reply-MIGSFLAGS): Define MACH_PAYLOAD_TO_PORT. --- trans/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trans/Makefile b/trans/Makefile index 04fd276..b6edb97 100644 --- a/trans/Makefile +++ b/trans/Makefile @@ -44,6 +44,9 @@ ifsock-MIGSFLAGS=\ "-DFIL

[PATCH hurd 27/30] hurd: add intranpayload functions to all hurd types

2014-11-27 Thread Justus Winter
For each hurd type defined in hurd_types.h, add a intranpayload function. If an X_INTRAN mutation is defined for a type, a corresponding X_INTRAN_PAYLOAD has to be defined. If no X_INTRAN mutation is defined, use ports_payload_get_name as intranpayload function, turning the payload back into an p

[PATCH hurd 25/30] trans/symlink: disable default payload to port mapping

2014-11-27 Thread Justus Winter
`fsysServer' is only used by the symlink translator which does not use libports. Therefor, it is not necessary to use the default payload to port translation function. * trans/Makefile (fsys-MIGSFLAGS): Disable the default payload to port translation function. --- trans/Makefile | 4 1 file

[PATCH hurd 22/30] trans/ifsock: add a payload-aware intrans function

2014-11-27 Thread Justus Winter
* trans/Makefile (ifsock-MIGSFLAGS): Add mutator. --- trans/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/trans/Makefile b/trans/Makefile index 71e6424..eecaeeb 100644 --- a/trans/Makefile +++ b/trans/Makefile @@ -39,6 +39,7 @@ password-MIGSFLAGS=\ ifsock-MIGSFLAGS=\ "-DFILE

[PATCH hurd-dde 4/4] libmachdev: add payload-aware intrans functions

2014-11-27 Thread Justus Winter
* libmachdev/mig-mutate.h: Add mutators. * libmachdev/mig-decls.h (begin_using_device_payload): New function. * libmachdev/Makefile (device-MIGSFLAGS): Define MACH_PAYLOAD_TO_PORT. --- libmachdev/Makefile | 1 + libmachdev/mig-decls.h | 6 ++ libmachdev/mig-mutate.h | 4 3 files chan

[PATCH hurd 26/30] utils/rpctrace: make `trace_and_forward' payload-aware

2014-11-27 Thread Justus Winter
As the protected payloads were retrofitted into the Mach message format, the local port type is lost. * utils/rpctrace.c (is_notification): New function (trace_and_forward): Recover the original local port type. --- utils/rpctrace.c | 29 - 1 file changed, 28 insertion

[PATCH hurd 20/30] term: add a payload-aware intrans function

2014-11-27 Thread Justus Winter
* term/mig-mutate.h: Add mutator. --- term/Makefile | 1 + term/mig-decls.h | 6 ++ term/mig-mutate.h | 3 +++ 3 files changed, 10 insertions(+) diff --git a/term/Makefile b/term/Makefile index 5006c0d..1419d2a 100644 --- a/term/Makefile +++ b/term/Makefile @@ -33,5 +33,6 @@ include ../M

[PATCH hurd 16/30] pfinet: make the demuxers payload-aware

2014-11-27 Thread Justus Winter
* pfinet/ethernet.c (ethernet_demuxer): Make the demuxer payload-aware. * pfinet/main.c (pfinet_demuxer): Likewise. --- pfinet/ethernet.c | 20 +++- pfinet/main.c | 12 ++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/pfinet/ethernet.c b/pfinet/ether

[PATCH hurd 18/30] proc: add payload-aware intrans functions

2014-11-27 Thread Justus Winter
* proc/mig-decls.h (begin_using_proc_payload): New function. (begin_using_exc_payload): Likewise. * proc/mig-mutate.h: Add mutators. * proc/proc_exc.defs (exception_t): Add payload-aware in-translator function. --- proc/mig-decls.h | 17 + proc/mig-mutate.h | 4 proc/proc_

[PATCH hurd 29/30] libports: Fix build

2014-11-27 Thread Justus Winter
--- libports/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libports/Makefile b/libports/Makefile index f49cb9f..6e25cd7 100644 --- a/libports/Makefile +++ b/libports/Makefile @@ -42,7 +42,7 @@ installhdrs = ports.h HURDLIBS= ihash LDLIBS += -lpthread -OBJS = $(SR

[PATCH hurd 23/30] trans/password: add a payload-aware intrans function

2014-11-27 Thread Justus Winter
* trans/Makefile (password-MIGSFLAGS): Add mutator. --- trans/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/trans/Makefile b/trans/Makefile index eecaeeb..04fd276 100644 --- a/trans/Makefile +++ b/trans/Makefile @@ -34,6 +34,7 @@ LDLIBS += -lpthread password-LDLIBS = -lcrypt passw

[PATCH hurd 15/30] pfinet: add payload-aware intrans functions

2014-11-27 Thread Justus Winter
* pfinet/mig-mutate.h: Add mutators. * pfinet/mig-decls.h (begin_using_socket_payload): New function. (begin_using_sockaddr_payload): Likewise. --- pfinet/mig-decls.h | 12 pfinet/mig-mutate.h | 4 2 files changed, 16 insertions(+) diff --git a/pfinet/mig-decls.h b/pfinet/mig-

[PATCH hurd 13/30] console-client: make the demuxer payload-aware

2014-11-27 Thread Justus Winter
* console-client/trans.c (console_demuxer): make the demuxer payload-aware. --- console-client/trans.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/console-client/trans.c b/console-client/trans.c index 67cd149..224229e 100644 --- a/console-client/trans.c +++ b/

[PATCH hurd 19/30] startup: disable default payload to port mapping

2014-11-27 Thread Justus Winter
startup does not use libports. Therefor, it is not necessary to use the default payload to port translation function. * startup/Makefile (MIGSFLAGS): Disable the default payload to port translation function. --- startup/Makefile | 4 1 file changed, 4 insertions(+) diff --git a/startup/Make

[PATCH hurd 14/30] exec: add payload-aware intrans functions

2014-11-27 Thread Justus Winter
* exec/execmutations.h: Add mutators. * exec/mig-decls.h (begin_using_bootinfo_payload): New function. --- exec/execmutations.h | 3 +++ exec/mig-decls.h | 6 ++ 2 files changed, 9 insertions(+) diff --git a/exec/execmutations.h b/exec/execmutations.h index 2acca7a..0b5b8bb 100644 --- a/e

[PATCH hurd 12/30] console: add a payload-aware intrans function

2014-11-27 Thread Justus Winter
* console/priv.h (begin_using_protid_payload): New function. * console/mutations.h: Add mutators. --- console/mutations.h | 3 +++ libnetfs/priv.h | 6 ++ 2 files changed, 9 insertions(+) diff --git a/console/mutations.h b/console/mutations.h index 4e1cc7e..87906cc 100644 --- a/console/mu

[PATCH hurd 11/30] auth: add a payload-aware intrans function

2014-11-27 Thread Justus Winter
* auth/mig-mutate.h: Add mutator. * auth/mig-decls.h (auth_payload_to_handle): New function. --- auth/mig-decls.h | 6 ++ auth/mig-mutate.h | 1 + 2 files changed, 7 insertions(+) diff --git a/auth/mig-decls.h b/auth/mig-decls.h index 09c7c70..fa7b06d 100644 --- a/auth/mig-decls.h +++ b/auth

[PATCH hurd 08/30] libtrivfs: add payload-aware intrans functions

2014-11-27 Thread Justus Winter
* libtrivfs/mig-decls.h (trivfs_begin_using_protid_payload): New function. (trivfs_begin_using_control_payload): Likewise. * libtrivfs/mig-mutate.h: Add mutators. --- libtrivfs/mig-decls.h | 58 ++ libtrivfs/mig-mutate.h | 3 +++ 2 files changed, 6

[PATCH hurd 10/30] libcons: add a payload-aware intrans function

2014-11-27 Thread Justus Winter
* libcons/mutations.h: Add mutator. * libcons/priv.h (begin_using_notify_payload): New function. --- libcons/mutations.h | 1 + libcons/priv.h | 6 ++ 2 files changed, 7 insertions(+) diff --git a/libcons/mutations.h b/libcons/mutations.h index c895447..4751340 100644 --- a/libcons/mutat

[PATCH hurd 09/30] libpager: add a payload-aware intrans function

2014-11-27 Thread Justus Winter
* libpager/mig-decls.h (begin_using_pager_payload): New function. * libpager/mig-mutate.h: Add mutators. --- libpager/mig-decls.h | 6 ++ libpager/mig-mutate.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/libpager/mig-decls.h b/libpager/mig-decls.h index 0c7b402..7e6b64f 100644 ---

[PATCH hurd 06/30] libdiskfs: add payload-aware intrans functions

2014-11-27 Thread Justus Winter
* libdiskfs/diskfs.h (diskfs_begin_using_protid_payload): New function. (diskfs_begin_using_control_payload): Likewise. (diskfs_begin_using_bootinfo_payload): Likewise. * libdiskfs/fsmutations.h: Add mutators. --- libdiskfs/diskfs.h | 29 + libdiskfs/fsmutations.h

[PATCH hurd 02/30] include: force all refcount functions to be inlined

2014-11-27 Thread Justus Winter
* include/refcount.h: Declare all functions `extern inline' instead of `static inline'. This forces those functions to be inlined, and allows us to use them in functions declared as `extern inline'. --- include/refcount.h | 34 +- 1 file changed, 17 insertions(+),

[PATCH hurd 04/30] libports: add `ports_lookup_payload' and `ports_payload_get_name'

2014-11-27 Thread Justus Winter
These two functions map payloads to objects and port names. The former can be used like `ports_lookup_port' to look up objects, the latter to map payloads to port names if the server function expects a `mach_port_t'. * libports/ports.h: Add function ports_payload_get_name. * libports/lookup-payloa

[PATCH hurd 05/30] libports: add a payload-aware intrans function

2014-11-27 Thread Justus Winter
* libports/mig-decls.h (begin_using_port_info_payload): New function. * libports/mig-mutate.h: Add mutator. --- libports/mig-decls.h | 6 ++ libports/mig-mutate.h | 4 2 files changed, 10 insertions(+) diff --git a/libports/mig-decls.h b/libports/mig-decls.h index f8c4f15..c88ff26 10064

[PATCH hurd 03/30] Revert "random: fix a receiver lookup"

2014-11-27 Thread Justus Winter
This reverts "8927fbd63e29005ddb9b2c2264046089bf669857". The change mistakenly adds mutators for the `startup' protocol, but the server routine is for the `startup_notify' protocol. --- random/Makefile | 1 - random/mig-decls.h | 47 --- random/mi

[PATCH hurd 01/30] proc: fix NULL dereference

2014-11-27 Thread Justus Winter
This also restores the behavior before e9687ec4. * proc/notify.c (do_mach_notify_dead_name): Fix NULL dereference. --- proc/notify.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/proc/notify.c b/proc/notify.c index b6731ae..f179423 100644 --- a/proc/notify.c +++ b/pro

[PATCH gnumach] include: make `mach_port_t' payload-aware

2014-11-27 Thread Justus Winter
Honor a new macro `MACH_PAYLOAD_TO_PORT' to inject a translation function mapping payloads to port names in the definition of `mach_port_t'. * include/mach/std_types.defs (mach_port_t): Honor `MACH_PAYLOAD_TO_PORT'. * include/device/device.defs (reply_port_t): Likewise. * include/device/device_rep

Protected payloads for the Hurd servers

2014-11-27 Thread Justus Winter
Hello, these patches make libports use Gnumachs protected payloads to optimize the receiver lookup. In fact, we can now dispatch most messages without acquiring a lock in libports. The first patch is for Gnumachs type definitions. It changes `mach_port_t' (and reply ports) so that we can inject

Re: Atomic file locking update

2014-11-27 Thread Svante Signell
On Thu, 2014-11-27 at 13:20 +0100, Samuel Thibault wrote: > Justus Winter, le Thu 27 Nov 2014 12:51:56 +0100, a écrit : > > Just to be sure I understand the change correctly, the downgrade is > > somewhat trivial, right? > > Yes, we just have to notify potential writers. > > > Because your patch

Re: Atomic file locking update

2014-11-27 Thread Samuel Thibault
Justus Winter, le Thu 27 Nov 2014 12:51:56 +0100, a écrit : > Just to be sure I understand the change correctly, the downgrade is > somewhat trivial, right? Yes, we just have to notify potential writers. > Because your patch has an explicit 'tell > others we are upgrading' and my symmetry-sense i

Re: Atomic file locking update

2014-11-27 Thread Justus Winter
Hi :) Quoting Samuel Thibault (2014-11-23 17:38:32) > Hello, > > While Svante is working on the record locking, I have worked on at > least fixing whole file locking: there was one bug in our current > implementation: flock(LOCK_SH); flock(LOCK_EX);, as per POSIX, does not > guarantee an atomic u