Re: Spinlock init

2007-06-20 Thread Jack Stone
Roland Dreier wrote: > > can rwlock_init and spin_lock_init be used outside of functions declared > > __init. The spinlock documentation suggests that it can't but I'd like > > someone to confirm that. > > Those function can be used in any function. A function is declared > __init if it only r

Spinlock init

2007-06-20 Thread Jack Stone
Dear list, can rwlock_init and spin_lock_init be used outside of functions declared __init. The spinlock documentation suggests that it can't but I'd like someone to confirm that. Sorry if this has already been answered but I couldn't find anything on it. Jack - To unsubscribe from this list: se

Re: Versioning file system

2007-06-19 Thread Jack Stone
John Stoffel wrote: >>>>>> "Jack" == Jack Stone <[EMAIL PROTECTED]> writes: > > Jack> The whole idea of the file system is that it wouldn't return the > Jack> file in the file listing. The user would have to know that the > Jack> fil

Re: Versioning file system

2007-06-19 Thread Jack Stone
Chris Snook wrote: > Okay, so now you have to modify ls, cp, tar, and thousands of other > applications to be aware of the versioning, otherwise you can't use it. > > Please don't get hung up on the interface. This is a really cool > feature that will require some serious engineering work to mak

Re: Versioning file system

2007-06-19 Thread Jack Stone
Chris Snook wrote: > Jack Stone wrote: >> H. Peter Anvin wrote: >>> Chris Snook wrote: >>>> I pointed out NetApp's .snapshot directories because that's a method >>>> that uses legal path character, but doesn't break anything. With this >

Re: Versioning file system

2007-06-19 Thread Jack Stone
Chris Snook wrote: > Jack Stone wrote: >> The idea was that if you did an ls you would get the latest version of >> the file without the :revision_num. The only visible version would be >> the latest version, i.e. the current system would not change. The idea >> was that

Re: Versioning file system

2007-06-19 Thread Jack Stone
H. Peter Anvin wrote: > Jack Stone wrote: >> But that would cause havoc with shells which use ; to seperate commands. >> Using ; would defiantly break userspace >> > > Not really. It's just a bit awkward to use, but so's the whole concept. I think we can al

Re: Versioning file system

2007-06-19 Thread Jack Stone
H. Peter Anvin wrote: > Chris Snook wrote: >> I pointed out NetApp's .snapshot directories because that's a method >> that uses legal path character, but doesn't break anything. With this >> method, userspace tools will have to be taught that : is suddenly a >> special character. > > Not to menti

Re: Versioning file system

2007-06-19 Thread Jack Stone
Chris Snook wrote: > But what you're talking about *will* break userspace. If I do an ls in > a directory, and get pages upon pages of versions of just one file, > that's broken. If I tar up a directory and get a tarball that's > hundreds of times larger than it should be, that's broken. If you

Re: Versioning file system

2007-06-19 Thread Jack Stone
Kyle Moffett wrote: > On Jun 18, 2007, at 13:56:05, Bryan Henderson wrote: >>> The question remains is where to implement versioning: directly in >>> individual filesystems or in the vfs code so all filesystems can use it? >> >> Or not in the kernel at all. I've been doing versioning of the types

Re: Versioning file system

2007-06-18 Thread Jack Stone
Bryan Henderson wrote: >> Part of the problem is that "whenever you modify a file" >> is ill-defined, or rather, if you were to take the literal meaning of it >> you'd end up with an unmanageable number of revisions. > > Let me expand on that. Do you want to save a revision every time the user >

Re: Versioning file system

2007-06-18 Thread Jack Stone
Andreas Dilger wrote: > Too bad everyone is spending time on 10 similar-but-slightly-different > filesystems. This will likely end up with a bunch of filesystems that > implement some easy subset of features, but will not get polished for > users or have a full set of features implemented (e.g. AC

Re: Versioning file system

2007-06-16 Thread Jack Stone
Jan Harkes wrote: > Sites like portal.acm.org and citeseer.ist.psu.edu are good places to > find copies of these papers. They also provide links to other work that > either is cited by, or cites these papers which is a convenient way to > find other papers in this area. > > Researching, designing

Re: Versioning file system

2007-06-16 Thread Jack Stone
Jeffrey V. Merkey wrote: > When you get into the recycling issues with storage, the patents come > into play. Also, using the file name to reference revisions is already > the subject of a patent previously filed (I no longer own the patent, I > sold them to Canopy). There is a third one about to b

Re: Versioning file system

2007-06-16 Thread Jack Stone
Chris Snook wrote: > The underlying internal implementation of something like this wouldn't > be all that hard on many filesystems, but it's the interface that's the > problem. The ':' character is a perfectly legal filename character, so > doing it that way would break things. But to work withou

Re: Versioning file system

2007-06-16 Thread Jack Stone
alan wrote: > On Fri, 15 Jun 2007, H. Peter Anvin wrote: >> This is one of those things that seems like a good idea, but frequently >> ends up short. Part of the problem is that "whenever you modify a file" >> is ill-defined, or rather, if you were to take the literal meaning of it >> you'd end up

Versioning file system

2007-06-15 Thread Jack Stone
I hope I got the CC list right. Apologies to anyone in didn't include and anyone I shouldn't have included. The basic idea is to include an idea from VMS that seems to be quite useful: version numbers for files. The idea is that whenever you modify a file the system saves it to na new copy leavin

Re: [AppArmor 39/45] AppArmor: Profile loading and manipulation, pathname matching

2007-06-14 Thread Jack Stone
[EMAIL PROTECTED] wrote: > On Sun, 10 Jun 2007, Pavel Machek wrote: >> But you have that regex in _user_ space, in a place where policy >> is loaded into kernel. > > then the kernel is going to have to call out to userspace every time a > file is created or renamed and the policy is going to be en

Re: [PATCH 0/7] Cleanup code to replace DPRINTK with pr_debug

2007-06-10 Thread Jack Stone
Randy Dunlap wrote: > Hi, > > Doesn't this move printk-debug control from local source files > (i.e., targeted, specific ones) to a more global control (DEBUG)? > > If so, I don't see that as a generally good thing. > > If not, please correct me and tell me how this is useful to just > one insta

Re: [PATCH 2/7] Replace DPRINTK with pr_debug in alternative.c

2007-06-09 Thread Jack Stone
Alexey Dobriyan wrote: > , rendering "debug-alternative" option useless. So drop the patch entirely or change the DPRINTK macro to use pr_debug? Jack - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at htt

Re: [PATCH 6/7] Add pr_debug_pid to kernel.h

2007-06-09 Thread Jack Stone
Alexey Dobriyan wrote: > NO! We don't add macros for every debug format people use into core > headers. I think you should stop after pr_err(). That was what I though would be the answer which is why i did this change in the last set of patches. Jack - To unsubscribe from this list: send the line

[PATCH 7/7] Replace DPRINTK with pr_debug_pid in autofs4

2007-06-09 Thread Jack Stone
This patch uses the new pr_debug_pid function to replace DPRINKs in autofs4 without breaking the functionality. Signed-off-by: Jack Stone <[EMAIL PROTECTED]> --- Index: linux/fs/autofs4/autofs_i.h === --- linux.orig/fs/a

[PATCH 6/7] Add pr_debug_pid to kernel.h

2007-06-09 Thread Jack Stone
This patch adds a new function to kernel.h. This function prints out the pid of the current process and the name of the function where it was called from followed by the debug message and a newline. This function mimics the output of autofs4. Signed-off-by: Jack Stone <[EMAIL PROTEC

[PATCH 5/7] Replace DPRINTK with pr_debug in ncpfs

2007-06-09 Thread Jack Stone
This patch replaces DPRINTKs in ncpfs with a combination of pr_debug and pr_err as appropriate. Signed-off-by: Jack Stone <[EMAIL PROTECTED]> --- Index: linux/fs/ncpfs/dir.c === --- linux.orig/fs/ncpfs/dir.c +++ linux/fs/ncpfs

[PATCH 4/7] Update DPRINTK macro to use pr_debug

2007-06-09 Thread Jack Stone
This patch updates the DPRINTK macro in autofs4 to use pr_debug as the macro uses a special print format. Signed-off-by Jack Stone <[EMAIL PROTECTED]> --- Index: linux/fs/autofs4/autofs_i.h === --- linux.orig/fs/autofs4/auto

[PATCH 2/7] Replace DPRINTK with pr_debug in alternative.c

2007-06-09 Thread Jack Stone
This patch converts all DPRINTKs in alternative.c to pr_debug Signed-off-by: Jack Stone <[EMAIL PROTECTED]> --- --- linux/arch/i386/kernel/alternative.c2007-06-07 17:25:46.0 +0100 +++ linux/arch/i386/kernel/alternative.c2007-06-07 20:45:52.0 +0100 @@ -1,

[PATCH 3/7] Replace DPRINTK with pr_debug in autofs

2007-06-09 Thread Jack Stone
This patch replaces DPRINTKs in autofs Signed-off-by: Jack Stone <[EMAIL PROTECTED]> --- Index: linux/fs/autofs/autofs_i.h === --- linux.orig/fs/autofs/autofs_i.h +++ linux/fs/autofs/autofs_i.h @@ -31,12 +31,6 @@ #include #i

[PATCH 1/7] Add a new debug function to kernel.h

2007-06-09 Thread Jack Stone
This patch adds a new macro to print to KERN_ERR initially for ncp but others may want to use it Signed-off-by: Jack Stone <[EMAIL PROTECTED]> --- Index: linux/include/linux/kernel.h === --- linux.orig/include/linux/ke

Re: [PATCH 0/7] Cleanup code to replace DPRINTK with pr_debug

2007-06-09 Thread Jack Stone
Jack Stone wrote: > This patch series replaces DPRINTK with pr_debug in alternative.c, > autofs, autofs4 > and ncpfs. A new function called pr_err is also added to keep > functionality in > ncpfs. The last 2 patches add support for pr_debug_pid and apply it to > autofs4 to >

Re: [PATCH 0/7] Cleanup code to replace DPRINTK with pr_debug

2007-06-09 Thread Jack Stone
Ian Kent wrote: > On Fri, 2007-06-08 at 23:18 +0100, Jack Stone wrote: >> This patch series replaces DPRINTK with pr_debug in alternative.c, >> autofs, autofs4 >> and ncpfs. A new function called pr_err is also added to keep >> functionality in >> ncpfs. T

[PATCH 3/7] Replace DPRINTK with pr_debug in autofs

2007-06-08 Thread Jack Stone
Signed-off-by: Jack Stone <[EMAIL PROTECTED]> --- -#ifdef DEBUG -#define DPRINTK(D) (printk D) -#else -#define DPRINTK(D) ((void)0) -#endif - /* * If the daemon returns a negative response (AUTOFS_IOC_FAIL) then the * kernel will keep the negative response cached for up to the time

[PATCH 2/7] Replace DPRINTK with pr_debug in alternative.c

2007-06-08 Thread Jack Stone
Signed-off-by: Jack Stone <[EMAIL PROTECTED]> --- -#define DPRINTK(fmt, args...) if (debug_alternative) \ - printk(KERN_DEBUG fmt, args) - #ifdef GENERIC_NOP1 /* Use inline assembly to define this because the nops are defined as inline assembly strings in the include files

[PATCH 4/7] Update DPRINTK macro to use pr_debug in autofs4

2007-06-08 Thread Jack Stone
Signed-off-by: Jack Stone <[EMAIL PROTECTED]> --- #ifdef DEBUG -#define DPRINTK(fmt,args...) do { printk(KERN_DEBUG "pid %d: %s: " fmt "\n" , current->pid , __FUNCTION__ , ##args); } while(0) +#define DPRINTK(fmt,args...) do { pr_debug("pid %d: %s: "

[PATCH 1/7] Add a new debug function to kernel.h

2007-06-08 Thread Jack Stone
Signed-off-by: Jack Stone <[EMAIL PROTECTED]> --- Index: linux/include/linux/kernel.h === --- linux.orig/include/linux/kernel.h +++ linux/include/linux/kernel.h @@ -228,11 +228,18 @@ extern void print_hex_dump(const char *l

[PATCH 0/7] Cleanup code to replace DPRINTK with pr_debug

2007-06-08 Thread Jack Stone
This patch series replaces DPRINTK with pr_debug in alternative.c, autofs, autofs4 and ncpfs. A new function called pr_err is also added to keep functionality in ncpfs. The last 2 patches add support for pr_debug_pid and apply it to autofs4 to keep the output the same as the current DPRINTK stateme

[PATCH 7/7] Replace DPRINTK with pr_debug_pid in autofs4

2007-06-08 Thread Jack Stone
Signed-off-by: Jack Stone <[EMAIL PROTECTED]> --- -/* #define DEBUG */ - -#ifdef DEBUG -#define DPRINTK(fmt,args...) do { pr_debug("pid %d: %s: " fmt "\n" , current->pid , __FUNCTION__ , ##args); } while(0) -#else -#define DPRINTK(fmt,args...) do {} while(0) -#endif

[PATCH 6/7] Add pr_debug_pid to kernel.h

2007-06-08 Thread Jack Stone
Signed-off-by: Jack Stone <[EMAIL PROTECTED]> --- +static inline int __attribute__ ((format (printf, 1, 2))) pr_debug_pid(const char * fmt, ...) +{ + return 0; +} + static inline int __attribute__ ((format (printf, 1, 2))) pr_err(const char * fmt, ...) { return 0; --

[PATCH 5/7] Replace DPRINTK with pr_debug in ncpfs

2007-06-08 Thread Jack Stone
Signed-off-by: Jack Stone <[EMAIL PROTECTED]> --- - DDPRINTK("ncp_lookup_validate: %s/%s not valid, age=%ld, server lookup\n", + pr_debug("ncp_lookup_validate: %s/%s not valid, age=%ld, server lookup\n", dentry->d_parent->