Re: [PATCH] ROMFS: printk format warnings

2007-03-20 Thread David Howells
Acked-By: David Howells <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 1/9] AF_RXRPC: Add blkcipher accessors for using kernel data directly

2007-04-02 Thread David Howells
ts, on the other hand, is done through the scatter-gather list interface as the amount of data is sufficient that the expense of doing virtual address to page calculations is sufficiently small by comparison. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- crypto/blkcipher.c |2

[PATCH 2/9] AF_RXRPC: Move generic skbuff stuff from XFRM code to generic code

2007-04-02 Thread David Howells
Move generic skbuff stuff from XFRM code to generic code so that AF_RXRPC can use it too. The kdoc comments I've attached to the functions needs to be checked by whoever wrote them as I had to make some guesses about the workings of these functions. Signed-Off-By: David Howells <[EMAIL P

[PATCH 0/9] AF_RXRPC socket family and AFS rewrite

2007-04-02 Thread David Howells
The first of these patches together provide secure client-side RxRPC connectivity as a Linux kernel socket family. Only the RxRPC transport/session side is supplied - the presentation side (marshalling the data) is left to the client. Copies of the patches can be found here: http://peop

[PATCH 4/9] AF_RXRPC: Key facility changes for AF_RXRPC

2007-04-02 Thread David Howells
s. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- Documentation/keys.txt | 12 include/linux/key.h |2 ++ security/keys/keyring.c |2 ++ 3 files changed, 16 insertions(+), 0 deletions(-) diff --git a/Documentation/keys.txt b/Documentation/keys.txt index

[PATCH 3/9] AF_RXRPC: Make it possible to merely try to cancel timers and delayed work

2007-04-02 Thread David Howells
Export try_to_del_timer_sync() for use by the RxRPC module. Add a try_to_cancel_delayed_work() so that it is possible to merely attempt to cancel a delayed work timer. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- include/linux/workqueue.h | 21 + kernel/t

[PATCH 7/9] AF_RXRPC: Add an interface to the AF_RXRPC module for the AFS filesystem to use

2007-04-02 Thread David Howells
mote abort message. (*) Get the error number from a local or network error message. int rxrpc_kernel_get_error_number(struct sk_buff *skb); This is used to extract the error number from a message indicating either a local error occurred or a network error occurred. Signed-Off-By

[PATCH 1/8] AF_RXRPC: Move generic skbuff stuff from XFRM code to generic code [try #2]

2007-04-03 Thread David Howells
Move generic skbuff stuff from XFRM code to generic code so that AF_RXRPC can use it too. The kdoc comments I've attached to the functions needs to be checked by whoever wrote them as I had to make some guesses about the workings of these functions. Signed-Off-By: David Howells <[EMAIL P

[PATCH 3/8] AF_RXRPC: Key facility changes for AF_RXRPC [try #2]

2007-04-03 Thread David Howells
s. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- Documentation/keys.txt | 12 include/linux/key.h |2 ++ security/keys/keyring.c |2 ++ 3 files changed, 16 insertions(+), 0 deletions(-) diff --git a/Documentation/keys.txt b/Documentation/keys.txt index

[PATCH 2/8] AF_RXRPC: Make it possible to merely try to cancel timers and delayed work [try #2]

2007-04-03 Thread David Howells
Export try_to_del_timer_sync() for use by the RxRPC module. Add a try_to_cancel_delayed_work() so that it is possible to merely attempt to cancel a delayed work timer. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- include/linux/workqueue.h | 21 + kernel/t

[PATCH 6/8] AF_RXRPC: Add an interface to the AF_RXRPC module for the AFS filesystem to use [try #2]

2007-04-03 Thread David Howells
mote abort message. (*) Get the error number from a local or network error message. int rxrpc_kernel_get_error_number(struct sk_buff *skb); This is used to extract the error number from a message indicating either a local error occurred or a network error occurred. Signed-Off-By

[PATCH 0/8] AF_RXRPC socket family and AFS rewrite [try #2]

2007-04-03 Thread David Howells
The first of these patches together provide secure client-side RxRPC connectivity as a Linux kernel socket family. Only the RxRPC transport/session side is supplied - the presentation side (marshalling the data) is left to the client. Copies of the patches can be found here: http://peop

[PATCH] Add a struct key pointer to struct nameidata

2007-04-03 Thread David Howells
Hi Al, I'd like you to consider approving something like the attached patch. It allows a key to be obtained by a filesystem during a pathwalk to be used in subsequent operations in the pathwalk. The way I envision it working is this: (1) The nameidata::key pointer is initialised to NULL at th

[PATCH 0/8] AFS: Add security support and fix bugs

2007-04-11 Thread David Howells
These patches build on the patchset labelled "AF_RXRPC socket family and AFS rewrite". The patches are also available for http download. Firstly, the patches fix a number of bugs in AF_RXRPC: http://people.redhat.com/~dhowells/rxrpc/09-af_rxrpc-own-workqueues.diff http://people.

[PATCH 1/8] AF_RXRPC: Use own workqueues

2007-04-11 Thread David Howells
module. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- net/rxrpc/af_rxrpc.c | 17 ++--- net/rxrpc/ar-accept.c | 12 ++-- net/rxrpc/ar-ack.c| 10 +- net/rxrpc/ar-call.c | 16 net/rxrpc/ar-connection.c |

[PATCH 2/8] AF_RXRPC: Lower dead call timeout and fix available call counting on connections

2007-04-11 Thread David Howells
a connection that was supposed to have one available and didn't. In association with this, more assertions have been added to check this. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- net/rxrpc/ar-call.c | 59 + n

[PATCH 3/8] AFS: Fix callback aggregator work item deadlock

2007-04-11 Thread David Howells
Fix a deadlock in the give-up-callback aggregator dispatcher work item whereby the aggregator runs on keventd as does timed autounmount, thus leading to the unmount blocking keventd whilst waiting for keventd to run the aggregator when the give-up-callback buffer is full. Signed-Off-By: David

[PATCH 6/8] AFS: AF_RXRPC key changes

2007-04-11 Thread David Howells
ned-Off-By: David Howells <[EMAIL PROTECTED]> --- include/keys/rxrpc-type.h | 22 ++ net/rxrpc/af_rxrpc.c |2 ++ net/rxrpc/ar-key.c| 10 +- net/rxrpc/ar-output.c |6 +- 4 files changed, 38 insertions(+), 2 deletions(-) diff --gi

[PATCH 5/8] AFS: Handle multiple mounts of an AFS superblock correctly

2007-04-11 Thread David Howells
in any case, be obtained from sb->s_flags. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- fs/afs/super.c | 26 -- 1 files changed, 16 insertions(+), 10 deletions(-) diff --git a/fs/afs/super.c b/fs/afs/super.c index efc4fe6..77e6875 100644 --- a/fs/afs/supe

[PATCH 7/8] AFS: Permit key to be cached in nameidata

2007-04-11 Thread David Howells
gument to each of these. This might also be useful for NFS and CIFS. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- fs/namei.c|5 + fs/open.c |7 +-- include/linux/namei.h |1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a

[PATCH 4/8] AFS: Correctly alter relocation state after update and show state in /proc

2007-04-11 Thread David Howells
Correctly alter the relocation state after update is complete by switching it from "Updating" to "Valid". Also display the record state in the vlocation database proc file. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- fs/afs/proc.c | 15 +--

Re: [PATCH 8/8] AFS: Add security support

2007-04-11 Thread David Howells
J. Bruce Fields <[EMAIL PROTECTED]> wrote: > Just curious--when is the actual crypto done? There doesn't seem to be > any in this patch. See AF_RXRPC patch: http://people.redhat.com/~dhowells/rxrpc/04-af_rxrpc.diff You turn on CONFIG_RXKAD and load the rxkad module thus built (assuming

Re: [PATCH 3/17] afs: convert afs_dir_get_page to read_kmap_page

2007-04-12 Thread David Howells
Nate Diller <[EMAIL PROTECTED]> wrote: > -static struct page *afs_dir_get_page(struct inode *dir, unsigned long index) NAK. This conflicts with my AFS security patches, and eliminates any way of passing the key through to readpage(). David - To unsubscribe from this list: send the line "unsubsc

Re: [PATCH 3/17] afs: convert afs_dir_get_page to read_kmap_page

2007-04-12 Thread David Howells
Nate Diller <[EMAIL PROTECTED]> wrote: > Hmmm you're right. Is your security work going into the next -mm? I don't know. Andrew hasn't said anything. Andrew? Are you waiting for it to go through DaveM's networking tree? > If so, I'll just re-base this cleanup patch on that ... at the very le

Re: [PATCH 3/17] afs: convert afs_dir_get_page to read_kmap_page

2007-04-12 Thread David Howells
Andrew Morton <[EMAIL PROTECTED]> wrote: > > > Hmmm you're right. Is your security work going into the next -mm? > > > > I don't know. Andrew hasn't said anything. Andrew? Are you waiting for it > > to go through DaveM's networking tree? > > AF_RXRPC is a davem thing and "AFS: Add security s

Re: [PATCH 3/17] afs: convert afs_dir_get_page to read_kmap_page

2007-04-12 Thread David Howells
Nate Diller <[EMAIL PROTECTED]> wrote: > but that's a lot of code to avoid a single stack allocation. The > whole fake file pointer thing still strikes me as a little ugly, and > you're definitely not the first one who needed this sort of hackery. > ugh A better way might be to stick a void * in

d_revalidate not being called enough on mountpoints?

2007-04-16 Thread David Howells
Hi Al, I think there might be a problem in the VFS with d_revalidate() not being called enough on mountpoints. As far as I can tell from the printks in my AFS stuff, it's only called on the mounted-on dentry, and not the vfsmount-root dentry. However, with NFS at least (not so much AFS), can yo

Re: d_revalidate not being called enough on mountpoints?

2007-04-16 Thread David Howells
Trond Myklebust <[EMAIL PROTECTED]> wrote: > > I discovered it because I was relying on d_revalidate() to spot that the > > server had broken the callback on a directory that had been changed. > > However, the root directory of each volume isn't being d_revalidated. > > That sounds like an abuse.

What should dcache routines should be called at the end of mkdir?

2007-04-18 Thread David Howells
Hi Al, What d_xxx() functions should I call at the end of a filesystem mkdir() op? It would seem that I've got two choices: (1) just d_instantiate() (as ext2), or (2) d_instantiate() and d_rehash() both (as NFS). If I pick (1), then if I do: mkdir /afs/.cambridge.redhat.com/afsdoc/

Re: What should dcache routines should be called at the end of mkdir?

2007-04-18 Thread David Howells
David Howells <[EMAIL PROTECTED]> wrote: > In this case, afs_lookup() is called extraneously... But it does seem to > work. It does help, of course, if I hash the negative dentry in afs_lookup() in addition to d_instantiate()'ing it. In fact, d_add() is what I should'

[PATCH 01/16] AF_RXRPC: Move generic skbuff stuff from XFRM code to generic code [try #3]

2007-04-25 Thread David Howells
Move generic skbuff stuff from XFRM code to generic code so that AF_RXRPC can use it too. The kdoc comments I've attached to the functions needs to be checked by whoever wrote them as I had to make some guesses about the workings of these functions. Signed-Off-By: David Howells <[EMAIL P

[PATCH 00/16] AF_RXRPC socket family and AFS rewrite [try #3]

2007-04-25 Thread David Howells
The first of these patches together provide secure client-side RxRPC connectivity as a Linux kernel socket family. Only the RxRPC transport/session side is supplied - the presentation side (marshalling the data) is left to the client. Copies of the patches can be found here: http://peop

[PATCH 02/16] cancel_delayed_work: use del_timer() instead of del_timer_sync() [try #3]

2007-04-25 Thread David Howells
: Oleg Nesterov <[EMAIL PROTECTED]> Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- include/linux/workqueue.h |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 2a7b38d..b8abfc7 100644 --- a/

[PATCH 04/16] AF_RXRPC: Make it possible to merely try to cancel timers from a module [try #3]

2007-04-25 Thread David Howells
Export try_to_del_timer_sync() for use by the AF_RXRPC module. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- kernel/timer.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/kernel/timer.c b/kernel/timer.c index dd6c2c1..b22bd39 100644 --- a/kernel/timer.c

[PATCH 03/16] AF_RXRPC: Key facility changes for AF_RXRPC [try #3]

2007-04-25 Thread David Howells
s. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- Documentation/keys.txt | 12 include/linux/key.h |2 ++ security/keys/keyring.c |2 ++ 3 files changed, 16 insertions(+), 0 deletions(-) diff --git a/Documentation/keys.txt b/Documentation/keys.txt index

[PATCH 10/16] AFS: Handle multiple mounts of an AFS superblock correctly [try #3]

2007-04-25 Thread David Howells
in any case, be obtained from sb->s_flags. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- fs/afs/super.c | 26 -- 1 files changed, 16 insertions(+), 10 deletions(-) diff --git a/fs/afs/super.c b/fs/afs/super.c index efc4fe6..77e6875 100644 --- a/fs/afs/supe

[PATCH 13/16] commit ad495d7b6cfcd1bc2eaf06c42699be0bb5d84234 [try #3]

2007-04-25 Thread David Howells
[NETLINK]: Mirror UDP MSG_TRUNC semantics. If the user passes MSG_TRUNC in via msg_flags, return the full packet size not the truncated size. Idea from Herbert Xu and Thomas Graf. Signed-off-by: David S. Miller <[EMAIL PROTECTED]> --- net/netlink/af_netlink.c |3 +++ 1 file

[PATCH 15/16] AFS: Implement the CB.InitCallBackState3 operation [try #3]

2007-04-25 Thread David Howells
Implement the CB.InitCallBackState3 operation for the fileserver to call. This reduces the amount of network traffic because if this op is aborted, the fileserver will then attempt an CB.InitCallBackState operation. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- fs/afs/AFS_CM.h

[PATCH 14/16] AFS: Add support for the CB.GetCapabilities operation [try #3]

2007-04-25 Thread David Howells
erate through all the network interfaces using RTNETLINK to pull out the MAC address of the lowest index interface to use in UUID construction. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- fs/afs/AFS_CM.h|3 fs/afs/Makefile|1 fs/afs/cmservice.c

[PATCH 12/16] AFS: Update the AFS fs documentation [try #3]

2007-04-25 Thread David Howells
Update the AFS fs documentation. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- Documentation/filesystems/afs.txt | 214 +++-- 1 files changed, 154 insertions(+), 60 deletions(-) diff --git a/Documentation/filesystems/afs.txt b/Documentation/files

Re: [PATCH 00/16] AF_RXRPC socket family and AFS rewrite [try #3]

2007-04-25 Thread David Howells
Andrew Morton <[EMAIL PROTECTED]> wrote: > I'm ducking all feature and cleanup patches now, and probably shall > continue to do so for some weeks. The priority (which I believe to be > increasingly urgent) is to fix the 2.6.21 regressions and to stabilise > the things which we presently have queu

[PATCH 00/16] AF_RXRPC socket family and AFS rewrite [try #4]

2007-04-25 Thread David Howells
The first of these patches together provide secure client-side RxRPC connectivity as a Linux kernel socket family. Only the RxRPC transport/session side is supplied - the presentation side (marshalling the data) is left to the client. Copies of the patches can be found here: http://peop

[PATCH 02/16] cancel_delayed_work: use del_timer() instead of del_timer_sync() [try #4]

2007-04-25 Thread David Howells
: Oleg Nesterov <[EMAIL PROTECTED]> Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- include/linux/workqueue.h |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 2a7b38d..b8abfc7 100644 --- a/

[PATCH 10/16] AFS: Handle multiple mounts of an AFS superblock correctly [try #4]

2007-04-25 Thread David Howells
in any case, be obtained from sb->s_flags. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- fs/afs/super.c | 26 -- 1 files changed, 16 insertions(+), 10 deletions(-) diff --git a/fs/afs/super.c b/fs/afs/super.c index efc4fe6..77e6875 100644 --- a/fs/afs/supe

[PATCH 15/16] AFS: Implement the CB.InitCallBackState3 operation [try #4]

2007-04-25 Thread David Howells
Implement the CB.InitCallBackState3 operation for the fileserver to call. This reduces the amount of network traffic because if this op is aborted, the fileserver will then attempt an CB.InitCallBackState operation. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- fs/afs/afs_cm.h

[PATCH 13/16] commit ad495d7b6cfcd1bc2eaf06c42699be0bb5d84234 [try #4]

2007-04-25 Thread David Howells
[NETLINK]: Mirror UDP MSG_TRUNC semantics. If the user passes MSG_TRUNC in via msg_flags, return the full packet size not the truncated size. Idea from Herbert Xu and Thomas Graf. Signed-off-by: David S. Miller <[EMAIL PROTECTED]> --- net/netlink/af_netlink.c |3 +++ 1 file

[PATCH 14/16] AFS: Add support for the CB.GetCapabilities operation [try #4]

2007-04-25 Thread David Howells
erate through all the network interfaces using RTNETLINK to pull out the MAC address of the lowest index interface to use in UUID construction. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- fs/afs/Makefile|1 fs/afs/afs_cm.h|3 fs/afs/cmservice.c

[PATCH 12/16] AFS: Update the AFS fs documentation [try #4]

2007-04-25 Thread David Howells
Update the AFS fs documentation. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- Documentation/filesystems/afs.txt | 214 +++-- 1 files changed, 154 insertions(+), 60 deletions(-) diff --git a/Documentation/filesystems/afs.txt b/Documentation/files

[PATCH 03/16] AF_RXRPC: Key facility changes for AF_RXRPC [try #4]

2007-04-25 Thread David Howells
s. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- Documentation/keys.txt | 12 include/linux/key.h |2 ++ security/keys/keyring.c |2 ++ 3 files changed, 16 insertions(+), 0 deletions(-) diff --git a/Documentation/keys.txt b/Documentation/keys.txt index

[PATCH 04/16] AF_RXRPC: Make it possible to merely try to cancel timers from a module [try #4]

2007-04-25 Thread David Howells
Export try_to_del_timer_sync() for use by the AF_RXRPC module. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- kernel/timer.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/kernel/timer.c b/kernel/timer.c index dd6c2c1..b22bd39 100644 --- a/kernel/timer.c

[PATCH 01/16] AF_RXRPC: Move generic skbuff stuff from XFRM code to generic code [try #4]

2007-04-25 Thread David Howells
Move generic skbuff stuff from XFRM code to generic code so that AF_RXRPC can use it too. The kdoc comments I've attached to the functions needs to be checked by whoever wrote them as I had to make some guesses about the workings of these functions. Signed-Off-By: David Howells <[EMAIL P

Re: [PATCH 00/16] AF_RXRPC socket family and AFS rewrite [try #3]

2007-04-25 Thread David Howells
David Miller <[EMAIL PROTECTED]> wrote: > Then please generate your patches against my net-2.6.21 GIT > tree. Most of your initial patches in the series (the SKB > routine one for example) are already in my tree. Do you mean your net-2.6.22 GIT tree? Do you want me to make it available as a GIT

[PATCH 1/2] AFS: Make the match_*() functions take const options

2007-05-01 Thread David Howells
Make the match_*() functions take a const pointer to the options table and make strings pointers in the options table const too. Signed-off-by: David Howells <[EMAIL PROTECTED]> --- include/linux/parser.h |8 lib/parser.c | 10 +- 2 files changed, 9 inse

[PATCH 2/2] AFS/AF_RXRPC: Miscellaneous fixes

2007-05-01 Thread David Howells
map_atomic() as this breaks on m68k. Patch from Geert Uytterhoeven <[EMAIL PROTECTED]>. (*) Use match_*() functions rather than doing my own parsing. Signed-off-by: David Howells <[EMAIL PROTECTED]> --- fs/Kconfig|1 - fs/afs/fsclient.c |

Re: [PATCH 2/2] AFS/AF_RXRPC: Miscellaneous fixes

2007-05-01 Thread David Howells
Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: > I've just noticed another issue: if CONFIG_AFS_FS=y, the kernel build fails > with Can you send me the config you're using please? David - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [EMAIL P

[PATCH] AFS: Fix use of __exit functions from __init path

2007-05-01 Thread David Howells
Fix use of __exit functions from __init path. Signed-off-by: David Howells <[EMAIL PROTECTED]> --- fs/afs/callback.c |2 +- fs/afs/internal.h |4 ++-- fs/afs/vlocation.c |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/afs/callback.c b/fs/afs/call

[PATCH 1/5] [NETLINK]: Fix use after free in netlink_recvmsg

2007-05-03 Thread David Howells
When the user passes in MSG_TRUNC the skb is used after getting freed. Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]> Signed-off-by: David Howells <[EMAIL PROTECTED]> --- net/netlink/af_netlink.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a

[PATCH 3/5] [NET]: Add __dev_getfirstbyhwtype

2007-05-03 Thread David Howells
Add __dev_getfirstbyhwtype for callers that don't want a reference but some data from the device and thus need to take the rtnl anyway. Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]> Signed-off-by: David Howells <[EMAIL PROTECTED]> --- include/linux/netdevice.h |1

[PATCH 2/5] [AFS]: Fix memory leak in SRXAFSCB_GetCapabilities

2007-05-03 Thread David Howells
The interface array is not freed on exit. Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]> Signed-off-by: David Howells <[EMAIL PROTECTED]> --- fs/afs/cmservice.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c i

[PATCH 4/5] [AFS]: Replace rtnetlink client by direct dev_base walking

2007-05-03 Thread David Howells
Replace the large and complicated rtnetlink client by two simple functions for getting the MAC address for the first ethernet device and building a list of IPv4 addresses. Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]> Signed-off-by: David Howells <[EMAIL PROTECTED]> --- fs/

[PATCH 5/5] AFS: Adjust the new netdevice scanning code

2007-05-03 Thread David Howells
that we can actually check it. (3) Do the buffer fill count check before checking the for_primary_ifa condition again. This permits us to skip that check should maxbufs be reached before we run out of interfaces. Signed-off-by: David Howells <[EMAIL PROTECTED]> --- fs/afs/inte

[PATCH] AF_RXRPC: Sort out MTU handling

2007-05-04 Thread David Howells
t packet. This means, for example, that if AFS does a large StoreData op, all the packets barring the last will be filled to the maximum unfragmented size. Signed-off-by: David Howells <[EMAIL PROTECTED]> --- net/rxrpc/ar-ack.c| 80 +

[PATCH 1/3] AFS: Export a couple of core functions for AFS write support

2007-05-08 Thread David Howells
Export a couple of core functions for AFS write support to use: find_get_pages_contig() find_get_pages_tag() Signed-off-by: David Howells <[EMAIL PROTECTED]> --- mm/filemap.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/mm/filemap.c b/mm/fil

[PATCH 2/3] AFS: AFS fixups

2007-05-08 Thread David Howells
). (4) Rename some afs_file_*() functions to afs_*() where they apply to non-regular files too. (5) Be consistent about the presentation of volume ID:vnode ID in debugging output. Signed-off-by: David Howells <[EMAIL PROTECTED]> --- fs/afs/callback.c |9 ++ fs/afs

[PATCH 3/3] AFS: Implement basic file write support

2007-05-08 Thread David Howells
scrapped and reread before the second write takes place. If a page is dirty and the callback on it is broken by the server, then the dirty data is not discarded (same behaviour as NFS). Shared-writable mappings are not supported by this patch. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --

Re: [PATCH 3/3] AFS: Implement basic file write support

2007-05-09 Thread David Howells
Andrew Morton <[EMAIL PROTECTED]> wrote: > > + BUG_ON(i_size > 0x); // TODO: use 64-bit store > > You're sure this isn't user-triggerable? Hmmm... I'm not. I'll whip up a patch for this. > kmap_atomic() could be used here and is better. Yeah. It used to have something that slept i

Re: [PATCH 3/3] AFS: Implement basic file write support

2007-05-09 Thread David Howells
Andrew Morton <[EMAIL PROTECTED]> wrote: > set_page_dirty() will set I_DIRTY_PAGES only. ie: the inode has dirty > pagecache data. > > To tell the VFS that the inode itself is dirty one needs to run > mark_inode_dirty(). But what's the difference in this case? I don't need to write the inode b

[PATCH] AFS: Write support fixes

2007-05-09 Thread David Howells
AFS write support fixes: (1) Support large files using the 64-bit file access operations if available on the server. (2) Use kmap_atomic() rather than kmap() in afs_prepare_page(). (3) Don't do stuff in afs_writepage() that's done by the caller. Signed-off-by: David Howel

[PATCH] AFS: Further write support fixes

2007-05-09 Thread David Howells
circumstances. (2) Similarly, the outer loop in afs_pages_written_back() must also do an extra iteration if it ends with 'first == last', otherwise it fails to clear PG_writeback on the last page under some circumstances. Signed-off-by: David Howells <[EMAIL PROTECTED]> --

[PATCH] AF_RXRPC: Reduce debugging noise.

2007-05-09 Thread David Howells
Reduce debugging noise generated by AF_RXRPC. Signed-off-by: David Howells <[EMAIL PROTECTED]> --- net/rxrpc/ar-peer.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/ar-peer.c b/net/rxrpc/ar-peer.c index ce08b78..90fa107 100644 --- a/net/rxrpc/ar-

Re: [PATCH 3/3] AFS: Implement basic file write support

2007-05-10 Thread David Howells
Nick Piggin <[EMAIL PROTECTED]> wrote: > Why do you call SetPageUptodate when the page is not up to date? > That leaks uninitialised data, AFAIKS. It only seems that way. If afs_prepare_write() is called, but doesn't return an error, then afs_commit_write() will be called, and it seems that the

[PATCH 1/2] AFS: Fix interminable loop in afs_write_back_from_locked_page()

2007-05-10 Thread David Howells
und happily as far as I can see. Trival fix attached (compile tested only). Signed-Off-By: Mika Kukkonen <[EMAIL PROTECTED]> Signed-off-by: David Howells <[EMAIL PROTECTED]> --- fs/afs/write.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/afs/wri

[PATCH 2/2] AFS: Fix a couple of problems with unlinking AFS files

2007-05-10 Thread David Howells
atch calls invalidate_inode_pages2() instead on non-regular files. (2) afs_vnode_deleted_remotely() should handle vnodes that don't have a source server recorded without oopsing. Signed-off-by: David Howells <[EMAIL PROTECTED]> --- fs/afs/file.c |2 +- fs/afs/inode.c

[PATCH] AFS: Implement statfs

2007-05-10 Thread David Howells
Implement the statfs() op for AFS. Signed-off-by: David Howells <[EMAIL PROTECTED]> --- fs/afs/afs.h | 23 fs/afs/afs_fs.h |3 - fs/afs/dir.c | 18 ++- fs/afs/fsclient.c | 298 + fs/afs/internal.h |6 +

Re: [PATCH 1/2] AFS: Fix interminable loop in afs_write_back_from_locked_page()

2007-05-11 Thread David Howells
Andrew Morton <[EMAIL PROTECTED]> wrote: > Yes, it's a shame that there doesn't seem to be a fine-grained way of > turning on -W's useful bits. You can turn off -W's undesirable bits. For net/rxrpc/ and fs/afs/ at least, adding: CFLAGS += -W -Wno-unused-parameter to the Makefile genera

Re: [PATCH 1/2] AFS: Fix interminable loop in afs_write_back_from_locked_page()

2007-05-11 Thread David Howells
Andrew Morton <[EMAIL PROTECTED]> wrote: > More than one would expect, given that it is recommended in > Documentation/SubmitChecklist, which everyone reads ;) Which states incorrectly: | 22: Newly-added code has been compiled with `gcc -W'. This will generate | lots of noise, but is good f

Re: [PATCH 1/2] AFS: Fix interminable loop in afs_write_back_from_locked_page()

2007-05-11 Thread David Howells
Andrew Morton <[EMAIL PROTECTED]> wrote: > > Following bug was uncovered by compiling with '-W' flag: > > gcc -W finds a number of fairly scary bugs. Do you mean in my code specifically? Or in the kernel in general? As far as I can tell -W only finds an eye-glazingly large quantity of 'unused

[PATCH] AF_RXRPC: AF_RXRPC depends on IPv4

2007-05-14 Thread David Howells
Add a dependency for CONFIG_AF_RXRPC on CONFIG_INET. This fixes this error: net/built-in.o: In function `rxrpc_get_peer': (.text+0x42824): undefined reference to `ip_route_output_key' Signed-off-by: David Howells <[EMAIL PROTECTED]> --- net/rxrpc/Kconfig |2 +- 1

[PATCH] AF_RXRPC: Make call state names available if CONFIG_PROC_FS=n

2007-05-14 Thread David Howells
Make the call state names array available even if CONFIG_PROC_FS is disabled as it's used in other places (such as debugging statements) too. Signed-off-by: David Howells <[EMAIL PROTECTED]> --- net/rxrpc/ar-call.c | 19 +++ net/rxrpc/ar-proc.c | 19 ---

[PATCH 1/2] AFS: Fix afs_prepare_write()

2007-05-15 Thread David Howells
afs_prepare_write() should not mark a page up to date if it only partially fills it in, in expectation of the caller filling in the rest prior to calling commit_write(). commit_write(), however, should mark the page up to date. Signed-off-by: David Howells <[EMAIL PROTECTED]> ---

[PATCH 2/2] AFS: Implement shared-writable mmap

2007-05-15 Thread David Howells
then page_mkwrite() will flush it before attaching a record of the new key. Signed-off-by: David Howells <[EMAIL PROTECTED]> --- fs/afs/file.c | 22 -- fs/afs/internal.h |1 + fs/afs/write.c| 28 3 files changed, 49 insertions(+),

[PATCH] AFS: Write back dirty data on unmount

2007-05-15 Thread David Howells
Fix AFS to write back dirty on unmounting. This didn't happen because afs_super_ops.drop_inode was pointing to generic_delete_inode. Now this pointer is left set to NULL so that the default behaviour occurs instead. Signed-off-by: David Howells <[EMAIL PROTECTED]> --- fs/afs/sup

[PATCH] AFS: Implement shared-writable mmap [try #2]

2007-05-16 Thread David Howells
then page_mkwrite() will flush it before attaching a record of the new key. [try #2] Only flush the page if the page is still part of the mapping (truncate may have discarded it). Signed-off-by: David Howells <[EMAIL PROTECTED]> --- fs/afs/file.c | 22 -- fs/afs/internal.h |

Re: [PATCH 1 of 2] block_page_mkwrite() Implementation V2

2007-05-16 Thread David Howells
David Chinner <[EMAIL PROTECTED]> wrote: > + ret = block_prepare_write(page, 0, end, get_block); As I understand the way prepare_write() works, this is incorrect. The start and end points passed to block_prepare_write() delimit the region of the page that is going to be modified. This means

Re: [PATCH] AFS: Implement shared-writable mmap [try #2]

2007-05-16 Thread David Howells
Nick Piggin <[EMAIL PROTECTED]> wrote: > I would strongly suggest you used (0, PAGE_CACHE_SIZE) for the range, That tells prepare_write() that the region to be modified is the whole page - which is incorrect. We're going to change a little bit of it. Hmmm... Thinking about it again, I probably

Re: [PATCH 1 of 2] block_page_mkwrite() Implementation V2

2007-05-16 Thread David Howells
Nick Piggin <[EMAIL PROTECTED]> wrote: > Dave is using prepare_write here to ensure blocks are allocated in the > given range. The filesystem's ->nopage function must ensure it is uptodate > before allowing it to be mapped. Which is fine... assuming it's called. For blockdev-based filesystems, t

Re: [PATCH 1 of 2] block_page_mkwrite() Implementation V2

2007-05-16 Thread David Howells
David Woodhouse <[EMAIL PROTECTED]> wrote: > Really? Is it _really_ going to be modified? Well, generic_file_buffered_write() doesn't check the success of the copy before calling commit_write(), presumably because it uses fault_in_pages_readable() first. David - To unsubscribe from this list: se

Re: [PATCH] AFS: Implement shared-writable mmap [try #2]

2007-05-16 Thread David Howells
Nick Piggin <[EMAIL PROTECTED]> wrote: > In general (modulo bugs and crazy filesystems), you're not allowed to have > !uptodate pages mapped into user addresses because that implies the user > would be allowed to see garbage. Ths situation I have to deal with is a tricky one. Consider: (1) Use

Re: [PATCH] AFS: Implement shared-writable mmap [try #2]

2007-05-16 Thread David Howells
Nick Piggin <[EMAIL PROTECTED]> wrote: > > I can't call invalidate_inode_pages() or similar because that might > > incorrectly kill one of B's writes (or someone else's writes); besides, > > the on-server file hasn't changed. > > Why would that kill anyone's writes? Because invalidate_inode_page

Re: [PATCH] AFS: Implement shared-writable mmap [try #2]

2007-05-16 Thread David Howells
Nick Piggin <[EMAIL PROTECTED]> wrote: > > How do you do a write-through cache for shared-writable mmap? > > For shared writable mmap? I don't know... You can't do write-through caching for shared-writable mmap because the writes go directly into the pagecache once the page is made writable, at

Re: [PATCH 2/2] AFS: Implement shared-writable mmap

2007-05-16 Thread David Howells
Hugh Dickins <[EMAIL PROTECTED]> wrote: > > VM in a way that people are not unhappy with :) > > I'm hoping you intended one less negative ;) Or did you mean one fewer negative? :-) David - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [EMAI

Re: [PATCH] AFS: Implement shared-writable mmap [try #2]

2007-05-16 Thread David Howells
Nick Piggin <[EMAIL PROTECTED]> wrote: > You can drop the lock, do the invalidation, Hmmm... There's a danger of incurring a race by doing that. Consider two processes both trying to write to a dirty page for which writeback will be rejected: (1) The first process gets EKEYREJECTED from the s

Re: [PATCH] AFS: Implement shared-writable mmap [try #2]

2007-05-17 Thread David Howells
Nick Piggin <[EMAIL PROTECTED]> wrote: > No, you shouldn't. We could theoretically introduce a new API for this, > but I think it would be preferable if you can fix the race in the fs. Actually, I might be able to do better. When making a StoreData call to the AFS server, I send all the paramete

Re: [PATCH] AFS: Implement shared-writable mmap [try #2]

2007-05-17 Thread David Howells
David Howells <[EMAIL PROTECTED]> wrote: > When making a StoreData call to the AFS server, I send all the parameters > first, and at that point, the server will abort it, I think, if permission is > not available, and won't wait for the payload to be delivered. Make t

[PATCH] AFS: Implement file locking

2007-05-24 Thread David Howells
Implement file locking for AFS. Signed-off-by: David Howells <[EMAIL PROTECTED]> --- fs/afs/Makefile|1 fs/afs/afs.h |8 + fs/afs/afs_fs.h|3 fs/afs/callback.c |3 fs/afs/dir.c |1 fs/afs/file.c |2 fs/afs/flock.c

Re: [PATCH] AFS: Implement file locking

2007-05-26 Thread David Howells
J. Bruce Fields <[EMAIL PROTECTED]> wrote: > > + if (!afs_lock_manager) { > > + afs_lock_manager = create_singlethread_workqueue("kafs_lockd"); > > + if (!afs_lock_manager) > > + return -ENOMEM; > > + } > > + return 0; > > Doesn't this need some locking

Re: [PATCH] AFS: Implement file locking

2007-05-26 Thread David Howells
Kyle Moffett <[EMAIL PROTECTED]> wrote: > I was actually under the impression that OpenAFS had support for byte- > range locking (as well as lock upgrade/downgrade); As far as I know, there is no support for byte-range locking at all in the AFS protocol itself. The client can try to emulate byt

Re: [PATCH] AFS: drop explicit extern

2007-05-26 Thread David Howells
Randy Dunlap <[EMAIL PROTECTED]> wrote: > Don't use explicit extern specifier and quieten sparse warning: > fs/afs/vnode.c:564:12: warning: function 'afs_vnode_link' with external > linkage has definition Acked-By: David Howells <[EMAIL PROTECTED]> - To unsub

Re: [PATCH] AFS: Implement file locking

2007-05-27 Thread David Howells
J. Bruce Fields <[EMAIL PROTECTED]> wrote: > > > Do you allow upgrades and downgrades? (Just curious.) > > > > AFS does not, as far as I know. > > So if I request a write lock while holding a read lock, my request will > be denied? At the moment, yes. Don't the POSIX and flock lock-handling r

Re: [PATCH] AFS: Implement file locking

2007-05-29 Thread David Howells
J. Bruce Fields <[EMAIL PROTECTED]> wrote: > You can contrive examples of applications that would be correct given > the standard fcntl behavior, but that would deadlock on a system that > didn't allow read locks to jump the queue in the above situation. Yes, but you can also contrive starvation

  1   2   3   4   5   6   >