FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 10-01-2003, 12:07 AM
Wendy Cheng
 
Default cluster/gfs-kernel/src/gfs inode.c ops_file.c ...

Fabio M. Di Nitto wrote:



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.




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.




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
 
Old 11-30-2007, 08:48 PM
 
Default cluster/gfs-kernel/src/gfs inode.c ops_file.c ...

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: wcheng@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&r 1=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=RHEL 5&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=RHEL 5&r1=1.2&r2=1.2.2.1

--- cluster/gfs-kernel/src/gfs/inode.c 2006/10/05 16:04:38 1.26
+++ cluster/gfs-kernel/src/gfs/inode.c 2007/11/30 21:48:54 1.26.2.1
@@ -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 {
--- cluster/gfs-kernel/src/gfs/ops_file.c 2007/06/17 02:56:43 1.28.2.2
+++ cluster/gfs-kernel/src/gfs/ops_file.c 2007/11/30 21:48:54 1.28.2.3
@@ -1566,21 +1566,6 @@
if ((ip->i_di.di_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
return -ENOLCK;

- if (sdp->sd_args.ar_localflocks) {
- if (IS_GETLK(cmd)) {
- int conflict;
- struct file_lock tmp;
-
- conflict = posix_test_lock(file, fl, &tmp);
- fl->fl_type = F_UNLCK;
- if (conflict)
- memcpy(fl, &tmp, sizeof(struct file_lock));
- return 0;
- } else {
- return posix_lock_file_wait(file, fl);
- }
- }
-
if (IS_GETLK(cmd))
return gfs_lm_plock_get(sdp, &name, file, fl);
else if (fl->fl_type == F_UNLCK)
@@ -1722,7 +1707,6 @@
gfs_flock(struct file *file, int cmd, struct file_lock *fl)
{
struct gfs_inode *ip = get_v2ip(file->f_mapping->host);
- struct gfs_sbd *sdp = ip->i_sbd;

atomic_inc(&ip->i_sbd->sd_ops_file);

@@ -1731,9 +1715,6 @@
if ((ip->i_di.di_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
return -ENOLCK;

- if (sdp->sd_args.ar_localflocks)
- return flock_lock_file_wait(file, fl);
-
if (fl->fl_type == F_UNLCK) {
do_unflock(file, fl);
return 0;
@@ -1766,3 +1747,25 @@
.lock = gfs_lock,
.flock = gfs_flock,
};
+
+struct file_operations gfs_file_fops_nolock = {
+ .llseek = gfs_llseek,
+ .read = gfs_read,
+ .write = gfs_write,
+ .aio_read = gfs_aio_read,
+ .aio_write = gfs_aio_write,
+ .ioctl = gfs_ioctl,
+ .mmap = gfs_mmap,
+ .open = gfs_open,
+ .release = gfs_close,
+ .fsync = gfs_fsync,
+ .sendfile = gfs_sendfile,
+};
+
+struct file_operations gfs_dir_fops_nolock = {
+ .readdir = gfs_readdir,
+ .ioctl = gfs_ioctl,
+ .open = gfs_open,
+ .release = gfs_close,
+ .fsync = gfs_fsync,
+};
--- cluster/gfs-kernel/src/gfs/ops_file.h 2006/07/10 23:22:34 1.2
+++ cluster/gfs-kernel/src/gfs/ops_file.h 2007/11/30 21:48:54 1.2.2.1
@@ -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__ */
 
Old 12-01-2007, 03:08 AM
Fabio Massimo Di Nitto
 
Default cluster/gfs-kernel/src/gfs inode.c ops_file.c ...

wcheng@sourceware.org wrote:
> CVSROOT: /cvs/cluster
> Module name: cluster
> Branch: RHEL5
> Changes by: wcheng@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&r 1=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=RHEL 5&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=RHEL 5&r1=1.2&r2=1.2.2.1
>


Should this patch land in HEAD as well?

Thanks
Fabio

--
I'm going to make him an offer he can't refuse.
 
Old 12-02-2007, 01:51 AM
Wendy Cheng
 
Default cluster/gfs-kernel/src/gfs inode.c ops_file.c ...

Fabio Massimo Di Nitto wrote:


wcheng@sourceware.org wrote:



CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: wcheng@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&r 1=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=RHEL 5&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=RHEL 5&r1=1.2&r2=1.2.2.1






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
 
Old 12-02-2007, 06:18 AM
"Fabio M. Di Nitto"
 
Default cluster/gfs-kernel/src/gfs inode.c ops_file.c ...

Hi Wendy,

On Sat, 1 Dec 2007, Wendy Cheng wrote:


Fabio Massimo Di Nitto wrote:


wcheng@sourceware.org wrote:


CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: wcheng@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&r 1=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=RHEL 5&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=RHEL 5&r1=1.2&r2=1.2.2.1





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?

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.
 
Old 12-03-2007, 12:54 PM
"Fabio M. Di Nitto"
 
Default cluster/gfs-kernel/src/gfs inode.c ops_file.c ...

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

On Tue, 30 Sep 2003, Wendy Cheng wrote:


Fabio M. Di Nitto wrote:



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.


thanks a lot.





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.


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+qgXIpFBxnSjGf9vySNDK1HaTiSYB6bmfV 8q/dukwww6G/v6
bie7B68dY+CMdzBVLT1OiOe4917USoxulmHSdl2TOVTrEuaOv2 lSGE6GkQ47sGHT
wbBcnkviClLtu6qjTGr7ni9+x93wAp9GNIG+3+0983DbG6CYSD ECInzBHLt2szLT
j/aOqmdUSYFvGy+DRV3Fa84NnD4BEhPWh0plTw9S6Mnr0D89QCZc j3/t3H1zib6z
jDs9x8TTHHJPt9ng1CTTkJ+rTgPMfnIrCJ3/mCh5WcvrUrJ4eA473k5cqRCrV4wW
zq6HtU/d6uglpGX4gVFymtjgDJVT//sYAVzqS9XbL0+63Ee77w2Vtdr66Egfowun
zlHVBnp32DXEVyS5+PuzxvptEZ8uwQnHALMZPCVYsNa+Q7jONq AahluftY+bkRec
neWHOtWxgk46nmBclvvWogpgtYs+vmg1piFLlIGPDs+K+rVTTJ Xzk5E+Nd45ndrc
hMTg/gXcp6bO57kcjIv5if0BmUOvfw6wFmeVHwR2IEN/cYrrFHyV0NkS5cIxkF5d
y8ARNIyFDku9WLvjqs8oToaSLFZjY7VwcJRAn+QEEHHQLjWz0Z AiX5Gv8dXjtHuW
QThu5AuoadY=
=3xdI
-----END PGP SIGNATURE-----
 

Thread Tools




All times are GMT. The time now is 10:44 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org