[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 66/98: trans: improve the performance of dir_lookup in fakeroot
From: |
Samuel Thibault |
Subject: |
[hurd] 66/98: trans: improve the performance of dir_lookup in fakeroot |
Date: |
Tue, 14 Jan 2014 02:00:03 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 2ce5406504540399ed78306198802fc4e1824de7
Author: Justus Winter <address@hidden>
Date: Sat Dec 7 15:57:17 2013 +0100
trans: improve the performance of dir_lookup in fakeroot
Previously any FS_RETRY_NORMAL requests were handed back to the
client. Redo the lookup ourself instead. This saves us the burden to
create a fake node for the intermediate step, hand it back to the
client and handle another request from the client.
With this change there is no need to fiddle with the permission bits
as it was previously done.
* trans/fakeroot.c (netfs_S_dir_lookup): Redo the lookup transparently
for the user if FS_RETRY_NORMAL is requested.
fixup_improve_perf
---
trans/fakeroot.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 1ab3216..6e3b5d4 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -267,6 +267,14 @@ netfs_S_dir_lookup (struct protid *diruser,
goto redo_lookup;
case FS_RETRY_NORMAL:
+ if (retry_name[0] != '\0')
+ {
+ dir = file;
+ filename = retry_name;
+ goto redo_lookup;
+ }
+ break;
+
case FS_RETRY_MAGICAL:
default:
if (file == MACH_PORT_NULL)
@@ -305,10 +313,6 @@ netfs_S_dir_lookup (struct protid *diruser,
/* We already know about this node. */
mach_port_deallocate (mach_task_self (), idport);
pthread_mutex_lock (&np->lock);
- if (retry_name[0] != '\0')
- /* This was not the last component, remove O_WRITE to
- avoid opening directories with it. */
- flags &= ~O_WRITE;
err = check_openmodes (np->nn, (flags & (O_RDWR|O_EXEC)), file);
if (!err)
netfs_nref (np);
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 56/98: auth: improve the auth_demuxer function, (continued)
- [hurd] 56/98: auth: improve the auth_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 12/98: mach-defpager: remove unused variables, Samuel Thibault, 2014/01/13
- [hurd] 45/98: proc: store the privileged host port in _hurd_host_priv, Samuel Thibault, 2014/01/13
- [hurd] 36/98: libports: fix right leaks when adjusting priorities, Samuel Thibault, 2014/01/13
- [hurd] 65/98: trans: fix the use of the hash table in fakeroot.c, Samuel Thibault, 2014/01/13
- [hurd] 37/98: libshouldbeinlibc: fix minor port leak in maptime_map, Samuel Thibault, 2014/01/13
- [hurd] 38/98: init: fix port leak, Samuel Thibault, 2014/01/13
- [hurd] 68/98: trans: fix locking issue in fakeroot, Samuel Thibault, 2014/01/13
- [hurd] 55/98: pflocal: improve the demuxer functions, Samuel Thibault, 2014/01/13
- [hurd] 57/98: utils: improve the auth_demuxer function in fakeauth.c, Samuel Thibault, 2014/01/13
- [hurd] 66/98: trans: improve the performance of dir_lookup in fakeroot,
Samuel Thibault <=
- [hurd] 41/98: libports: improve error handling in ports_reallocate_from_external, Samuel Thibault, 2014/01/13
- [hurd] 40/98: libports: improve error handling in ports_reallocate_port, Samuel Thibault, 2014/01/13
- [hurd] 58/98: trans: remove unused declaration from fakeroot.c, Samuel Thibault, 2014/01/13
- [hurd] 72/98: trans: fix reference counting bug in fakeroot, Samuel Thibault, 2014/01/13
- [hurd] 39/98: proc: update comments, Samuel Thibault, 2014/01/13
- [hurd] 26/98: Make sure created netfs nodes have stat validated, Samuel Thibault, 2014/01/13
- [hurd] 53/98: proc: improve the message_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 04/98: utils: implement settrans --pid-file, Samuel Thibault, 2014/01/13
- [hurd] 59/98: trans: improve the netfs_demuxer function in fakeroot.c, Samuel Thibault, 2014/01/13
- [hurd] 48/98: libports: another right leak fix, Samuel Thibault, 2014/01/13