Re: GFS, what's remainingh

2005-09-06 Thread Daniel Phillips
On Tuesday 06 September 2005 02:55, Dmitry Torokhov wrote:
 On Tuesday 06 September 2005 01:48, Daniel Phillips wrote:
  On Tuesday 06 September 2005 01:05, Dmitry Torokhov wrote:
   do you think it is a bit premature to dismiss something even without
   ever seeing the code?
 
  You told me you are using a dlm for a single-node application, is there
  anything more I need to know?

 I would still like to know why you consider it a sin. On OpenVMS it is
 fast, provides a way of cleaning up...

There is something hard about handling EPIPE?

 and does not introduce single point 
 of failure as it is the case with a daemon. And if we ever want to spread
 the load between 2 boxes we easily can do it.

But you said it runs on an aging Alpha, surely you do not intend to expand it 
to two aging Alphas?  And what makes you think that socket-based 
synchronization keeps you from spreading out the load over multiple boxes?

 Why would I not want to use it?

It is not the right tool for the job from what you have told me.  You want to 
get a few bytes of information from one task to another?  Use a socket, as 
God intended.

Regards,

Daniel
-
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


Re: [RFC] [PATCH] Stacking support for inode_init_security

2005-09-06 Thread Christoph Hellwig
On Fri, Aug 19, 2005 at 03:47:12PM -0500, [EMAIL PROTECTED] wrote:
 The following patch changes the (new to -mm) inode_init_security
 function to support multiple LSMs.  It does this by placing the
 three passed arguments (name, value, len) into a structure, and
 passing in a list_head, onto which the structure can be appended.
 The callers (filesystems) call their fs_xattr_set functions
 on each returned (name, value, len) set.
 
 This is useful both for the stacker LSM, and for any two (or more)
 LSMs which might want to cooperate even without stacker.
 
 I've tested it under a plain selinux-enabled 2.6.13-rc6-mm1 using
 Stephen Smalley's sample exploit originally motivating
 inode_init_security, as well as with a simple 'touch ab; ls -Z ab'.
 
 I've also tested it with a corresponding stacker patch, with
 selinux stacked with two test LSMs which simply define
 inode_init_security.  Again, this passed the sample exploit, and
 manually inspecting the .security xattrs gave the expected results.

I'm personally against supporting stacking LSMs, but if the relevant
maintainers decided we really want to have them this patch is nessecary
to support it and thus okay.

-
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


Re: GFS, what's remainingh

2005-09-06 Thread Alan Cox
On Maw, 2005-09-06 at 02:48 -0400, Daniel Phillips wrote:
 On Tuesday 06 September 2005 01:05, Dmitry Torokhov wrote:
  do you think it is a bit premature to dismiss something even without
  ever seeing the code?
 
 You told me you are using a dlm for a single-node application, is there 
 anything more I need to know?

That's standard practice for many non-Unix operating systems. It means
your code supports failover without much additional work and it provides
all the functionality for locks on a single node too

-
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 2.6.13] bfs: fix endianness, signedness; add trivial bugfix

2005-09-06 Thread Andrew Stribblehill
* Makes BFS code endianness-clean.


* Fixes some signedness warnings.


* Fixes a problem in fs/bfs/inode.c:164 where inodes not synced to disk
don't get fully marked as clean. Here's how to reproduce it:

# mount -o loop -t bfs /bfs.img /mnt
# df -i /mnt
FilesystemInodes   IUsed   IFree IUse% Mounted on
/bfs.img  48   1  473% /mnt
# df -k /mnt
Filesystem   1K-blocks  Used Available Use% Mounted on
/bfs.img   512 5   508   1% /mnt
# cp 60k-archive.zip /mnt/mt.zip
# df -k /mnt
Filesystem   1K-blocks  Used Available Use% Mounted on
/bfs.img   51265   447  13% /mnt
# df -i /mnt
FilesystemInodes   IUsed   IFree IUse% Mounted on
/bfs.img  48   2  465% /mnt
# rm /mnt/mt.zip
# echo $?
0

 [If the unlink happens before the buffers flush, the following happens:]

# df -i /mnt
FilesystemInodes   IUsed   IFree IUse% Mounted on
/bfs.img  48   2  465% /mnt
# df -k /mnt
Filesystem   1K-blocks  Used Available Use% Mounted on
/bfs.img   51265   447  13% /mnt


 fs/bfs/bfs.h   |1 
 fs/bfs/dir.c   |   25 ++--
 fs/bfs/file.c  |   23 ++-
 fs/bfs/inode.c |  100 ++---
 include/linux/bfs_fs.h |   23 +--
 5 files changed, 92 insertions(+), 80 deletions(-)

Signed-off-by: Andrew Stribblehill [EMAIL PROTECTED]

--- kernel/fs/bfs/bfs.h 2005-09-02 13:23:24.0 +0100
+++ kernel/fs/bfs/bfs.h 2005-09-02 15:01:52.0 +0100
@@ -20,7 +20,6 @@
unsigned long si_lasti;
unsigned long * si_imap;
struct buffer_head * si_sbh;/* buffer header w/superblock */
-   struct bfs_super_block * si_bfs_sb; /* superblock in si_sbh-b_data 
*/
 };
 
 /*
--- kernel/fs/bfs/dir.c 2005-09-02 13:23:24.0 +0100
+++ kernel/fs/bfs/dir.c 2005-09-02 15:01:52.0 +0100
@@ -2,6 +2,7 @@
  * fs/bfs/dir.c
  * BFS directory operations.
  * Copyright (C) 1999,2000  Tigran Aivazian [EMAIL PROTECTED]
+ *  Made endianness-clean by Andrew Stribblehill [EMAIL PROTECTED] 2005
  */
 
 #include linux/time.h
@@ -20,9 +21,9 @@
 #define dprintf(x...)
 #endif
 
-static int bfs_add_entry(struct inode * dir, const char * name, int namelen, 
int ino);
+static int bfs_add_entry(struct inode * dir, const unsigned char * name, int 
namelen, int ino);
 static struct buffer_head * bfs_find_entry(struct inode * dir, 
-   const char * name, int namelen, struct bfs_dirent ** res_dir);
+   const unsigned char * name, int namelen, struct bfs_dirent ** res_dir);
 
 static int bfs_readdir(struct file * f, void * dirent, filldir_t filldir)
 {
@@ -53,7 +54,7 @@
de = (struct bfs_dirent *)(bh-b_data + offset);
if (de-ino) {
int size = strnlen(de-name, BFS_NAMELEN);
-   if (filldir(dirent, de-name, size, f-f_pos, 
de-ino, DT_UNKNOWN)  0) {
+   if (filldir(dirent, de-name, size, f-f_pos, 
le16_to_cpu(de-ino), DT_UNKNOWN)  0) {
brelse(bh);
unlock_kernel();
return 0;
@@ -107,7 +108,7 @@
inode-i_mapping-a_ops = bfs_aops;
inode-i_mode = mode;
inode-i_ino = ino;
-   BFS_I(inode)-i_dsk_ino = ino;
+   BFS_I(inode)-i_dsk_ino = cpu_to_le16(ino);
BFS_I(inode)-i_sblock = 0;
BFS_I(inode)-i_eblock = 0;
insert_inode_hash(inode);
@@ -139,7 +140,7 @@
lock_kernel();
bh = bfs_find_entry(dir, dentry-d_name.name, dentry-d_name.len, de);
if (bh) {
-   unsigned long ino = le32_to_cpu(de-ino);
+   unsigned long ino = (unsigned long)le16_to_cpu(de-ino);
brelse(bh);
inode = iget(dir-i_sb, ino);
if (!inode) {
@@ -183,7 +184,7 @@
inode = dentry-d_inode;
lock_kernel();
bh = bfs_find_entry(dir, dentry-d_name.name, dentry-d_name.len, de);
-   if (!bh || de-ino != inode-i_ino) 
+   if (!bh || le16_to_cpu(de-ino) != inode-i_ino) 
goto out_brelse;
 
if (!inode-i_nlink) {
@@ -224,7 +225,7 @@
old_dentry-d_name.name, 
old_dentry-d_name.len, old_de);
 
-   if (!old_bh || old_de-ino != old_inode-i_ino)
+   if (!old_bh || le16_to_cpu(old_de-ino) != old_inode-i_ino)
goto end_rename;
 
error = -EPERM;
@@ -270,7 +271,7 @@
.rename = bfs_rename,
 };
 
-static int bfs_add_entry(struct inode * dir, const char * name, int namelen, 
int ino)
+static int bfs_add_entry(struct inode * dir, const unsigned char * name, int 
namelen, int ino)
 {