Skip to contentSkip to conversation

cluster/gfs-kernel/src/gfs inode.c ops_file.c ...

Cluster-devel [email protected] 3 participants 6 messages Nov 30, 2007 – Dec 3, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: wcheng at sourceware.org 2007-11-30 21:48:54

Modified files:
gfs-kernel/src/gfs: inode.c ops_file.c ops_file.h

Log message:
Red Hat bugzilla 244343:

GFS supports two modes of locking - lock_nolock for single node filesystem and lock_dlm for cluster mode locking. The gfs lock methods are removed from file operation table for lock_nolock protocol. This would allow VFS to handle posix lock and flock logics just like other in-tree filesystems without duplication.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/inode.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.26&r2=1.26.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_file.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.28.2.2&r2=1.28.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_file.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2&r2=1.2.2.1

gfs-kernel/src/gfs/inode.c +9 -2
@@ -170,6 +170,7 @@
 struct inode *
 gfs_iget(struct gfs_inode *ip, int create)
 {
+	struct gfs_sbd *sdp = ip->i_sbd;
 	struct inode *inode = NULL, *tmp;
 
 	spin_lock(&ip->i_spin);
@@ -189,13 +190,19 @@
 	/* Attach GFS-specific ops vectors */
 	if (ip->i_di.di_type == GFS_FILE_REG) {
 		tmp->i_op = &gfs_file_iops;
-		tmp->i_fop = &gfs_file_fops;
 		memcpy(&ip->gfs_file_aops, &gfs_file_aops,
 			   sizeof(struct address_space_operations));
 		tmp->i_mapping->a_ops = &ip->gfs_file_aops;
+		if (sdp->sd_args.ar_localflocks)
+			tmp->i_fop = &gfs_file_fops_nolock;
+		else
+			tmp->i_fop = &gfs_file_fops;
 	} else if (ip->i_di.di_type == GFS_FILE_DIR) {
 		tmp->i_op = &gfs_dir_iops;
-		tmp->i_fop = &gfs_dir_fops;
+		if (sdp->sd_args.ar_localflocks)
+			tmp->i_fop = &gfs_dir_fops_nolock;
+		else
+			tmp->i_fop = &gfs_dir_fops;
 	} else if (ip->i_di.di_type == GFS_FILE_LNK) {
 		tmp->i_op = &gfs_symlink_iops;
 	} else {
gfs-kernel/src/gfs/ops_file.c +22 -19

62 lines not on this page · raw message

gfs-kernel/src/gfs/ops_file.h +2 -0
@@ -16,5 +16,7 @@
 
 extern struct file_operations gfs_file_fops;
 extern struct file_operations gfs_dir_fops;
+extern struct file_operations gfs_file_fops_nolock;
+extern struct file_operations gfs_dir_fops_nolock;
 
 #endif /* __OPS_FILE_DOT_H__ */
#1 lore raw
Quoted 17 lines · wcheng at sourceware.org

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: wcheng at sourceware.org 2007-11-30 21:48:54

Modified files:
gfs-kernel/src/gfs: inode.c ops_file.c ops_file.h

Log message:
Red Hat bugzilla 244343:

GFS supports two modes of locking - lock_nolock for single node filesystem and lock_dlm for cluster mode locking. The gfs lock methods are removed from file operation table for lock_nolock protocol. This would allow VFS to handle posix lock and flock logics just like other in-tree filesystems without duplication.

Quoted 5 lines

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/inode.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.26&r2=1.26.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_file.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.28.2.2&r2=1.28.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_file.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2&r2=1.2.2.1

Should this patch land in HEAD as well?

Thanks
Fabio

Signature · 1 line
I'm going to make him an offer he can't refuse.
#2 lore raw
Quoted 29 lines · Fabio Massimo Di Nitto
Quoted 17 lines · wcheng at sourceware.org

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: wcheng at sourceware.org 2007-11-30 21:48:54

Modified files:
gfs-kernel/src/gfs: inode.c ops_file.c ops_file.h

Log message:
Red Hat bugzilla 244343:

GFS supports two modes of locking - lock_nolock for single node filesystem and lock_dlm for cluster mode locking. The gfs lock methods are removed from file operation table for lock_nolock protocol. This would allow VFS to handle posix lock and flock logics just like other in-tree filesystems without duplication.

Quoted 7 lines

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/inode.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.26&r2=1.26.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_file.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.28.2.2&r2=1.28.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_file.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2&r2=1.2.2.1

Quoted 5 lines

Should this patch land in HEAD as well?

Yes .. but gfs(1)-kernel HEAD is currently broken .. Will review few proposed patches (including your NFS patches) and do a clean-up first thing next week.

-- Wendy

#3 lore raw

Hi Wendy,

Quoted 31 lines · Wendy Cheng
Quoted 29 lines · Fabio Massimo Di Nitto
Quoted 25 lines · wcheng at sourceware.org

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: wcheng at sourceware.org 2007-11-30 21:48:54

Modified files:
gfs-kernel/src/gfs: inode.c ops_file.c ops_file.h
Log message:

	Red Hat bugzilla 244343:
		GFS supports two modes of locking - lock_nolock for single 

node filesystem
and lock_dlm for cluster mode locking. The gfs lock methods are
removed from
file operation table for lock_nolock protocol. This would allow VFS
to handle
posix lock and flock logics just like other in-tree filesystems
without
duplication.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/inode.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.26&r2=1.26.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_file.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.28.2.2&r2=1.28.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_file.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2&r2=1.2.2.1

Quoted 5 lines
Quoted 4 lines

Should this patch land in HEAD as well?

Yes .. but gfs(1)-kernel HEAD is currently broken ..

I am adding Phillip in CC.

So far he has been doing some work on gfs1 for Ubuntu, that includes a bunch of fixes. I was not able (mainly I did run out of time) to push them all.

We have a git import based on a slightly old cvs head snapshot here:
http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-hardy-lum.git;a=summary

There is a bit of merge that needs to be done between that tree and CVS, but there are some valuable fixes in there too that you want to take into account.

Phillip knows more and better than me how those should be merged.

Also.. do you know how is gfs1-kernel broken in HEAD?

Quoted 2 lines

Will review few proposed
patches (including your NFS patches) and do a clean-up first thing next week.

That's probably not from me :) I never played around with NFS patches ;)

Cheers
Fabio

--
I'm going to make him an offer he can't refuse.

#4 lore raw
Quoted 11 lines · Fabio M. Di Nitto
Quoted 2 lines

Yes .. but gfs(1)-kernel HEAD is currently broken ..

I am adding Phillip in CC.

So far he has been doing some work on gfs1 for Ubuntu, that includes a bunch of fixes. I was not able (mainly I did run out of time) to push them all.

We have a git import based on a slightly old cvs head snapshot here:
http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-hardy-lum.git;a=summary

Glad to know people still working on this out-of-tree filesystem ... Will look into this.

Quoted 8 lines

There is a bit of merge that needs to be done between that tree and CVS, but there are some valuable fixes in there too that you want to take into account.

Phillip knows more and better than me how those should be merged.

Also.. do you know how is gfs1-kernel broken in HEAD?

Few things such as vector read/write .. but the most pressing issue is that it won't compile due to newer kernel NFS changes.

Quoted 6 lines
Quoted 3 lines

Will review few proposed patches (including your NFS patches) and do a clean-up first thing next week.

That's probably not from me :) I never played around with NFS patches ;)

Well, maybe I remember it wrong ... Anyway, thanks for the info.

-- Wendy

#5 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 10 lines · Wendy Cheng
Quoted 9 lines · Fabio M. Di Nitto
Quoted 2 lines

Yes .. but gfs(1)-kernel HEAD is currently broken ..

I am adding Phillip in CC.

So far he has been doing some work on gfs1 for Ubuntu, that includes a bunch of fixes. I was not able (mainly I did run out of time) to push them all.

Quoted 5 lines
Quoted 2 lines

We have a git import based on a slightly old cvs head snapshot here:
http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-hardy-lum.git;a=summary

Glad to know people still working on this out-of-tree filesystem ... Will look into this.

thanks a lot.

Quoted 6 lines
Quoted 6 lines

There is a bit of merge that needs to be done between that tree and CVS, but there are some valuable fixes in there too that you want to take into account.

Quoted 6 lines
Quoted 3 lines

Phillip knows more and better than me how those should be merged.

Also.. do you know how is gfs1-kernel broken in HEAD?

Few things such as vector read/write .. but the most pressing issue is that it won't compile due to newer kernel NFS changes.

then it is possible that the porting that i did to .24 was due to NFS changes. I didn't really dig into why the API was changed. Just ported to it following the changes in all other FS'es. :)

Cheers
Fabio

- --
I'm going to make him an offer he can't refuse.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iQIVAwUBR1QKsFA6oBJjVJ+OAQJMlQ//eUivTE/hxO60jqX2IJGQIpAGTrmbY/45 1sO+fw76Ae6ALrpG+qgXIpFBxnSjGf9vySNDK1HaTiSYB6bmfV8q/dukwww6G/v6 bie7B68dY+CMdzBVLT1OiOe4917USoxulmHSdl2TOVTrEuaOv2lSGE6GkQ47sGHT wbBcnkviClLtu6qjTGr7ni9+x93wAp9GNIG+3+0983DbG6CYSDECInzBHLt2szLT j/aOqmdUSYFvGy+DRV3Fa84NnD4BEhPWh0plTw9S6Mnr0D89QCZcj3/t3H1zib6z jDs9x8TTHHJPt9ng1CTTkJ+rTgPMfnIrCJ3/mCh5WcvrUrJ4eA473k5cqRCrV4wW zq6HtU/d6uglpGX4gVFymtjgDJVT//sYAVzqS9XbL0+63Ee77w2Vtdr66Egfowun zlHVBnp32DXEVyS5+PuzxvptEZ8uwQnHALMZPCVYsNa+Q7jONqAahluftY+bkRec neWHOtWxgk46nmBclvvWogpgtYs+vmg1piFLlIGPDs+K+rVTTJXzk5E+Nd45ndrc hMTg/gXcp6bO57kcjIv5if0BmUOvfw6wFmeVHwR2IEN/cYrrFHyV0NkS5cIxkF5d y8ARNIyFDku9WLvjqs8oToaSLFZjY7VwcJRAn+QEEHHQLjWz0ZAiX5Gv8dXjtHuW QThu5AuoadY=
=3xdI
-----END PGP SIGNATURE-----