LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/2] [GFS2] remove gfs2_dev_iops
@ 2008-02-26  7:25 ` Denis Cheng
  2008-02-26  7:25   ` [PATCH 2/2] [GFS2] re-support special inode Denis Cheng
  2008-02-27 18:08   ` [PATCH 1/2] [GFS2] remove gfs2_dev_iops Steven Whitehouse
  0 siblings, 2 replies; 3+ messages in thread
From: Denis Cheng @ 2008-02-26  7:25 UTC (permalink / raw)
  To: Steven Whitehouse; +Cc: cluster-devel, linux-kernel

struct inode_operations gfs2_dev_iops is always the same as gfs2_file_iops,
since Jan 2006, when GFS2 merged into mainstream kernel.

So one of them could be removed.

Signed-off-by: Denis Cheng <crquan@gmail.com>
---
 fs/gfs2/inode.c     |    2 +-
 fs/gfs2/ops_inode.c |   10 ----------
 fs/gfs2/ops_inode.h |    1 -
 3 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 37725ad..1069ceb 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -149,7 +149,7 @@ void gfs2_set_iop(struct inode *inode)
 	} else if (S_ISLNK(mode)) {
 		inode->i_op = &gfs2_symlink_iops;
 	} else {
-		inode->i_op = &gfs2_dev_iops;
+		inode->i_op = &gfs2_file_iops;
 	}
 
 	unlock_new_inode(inode);
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c
index e874129..ab9a073 100644
--- a/fs/gfs2/ops_inode.c
+++ b/fs/gfs2/ops_inode.c
@@ -1148,16 +1148,6 @@ const struct inode_operations gfs2_file_iops = {
 	.removexattr = gfs2_removexattr,
 };
 
-const struct inode_operations gfs2_dev_iops = {
-	.permission = gfs2_permission,
-	.setattr = gfs2_setattr,
-	.getattr = gfs2_getattr,
-	.setxattr = gfs2_setxattr,
-	.getxattr = gfs2_getxattr,
-	.listxattr = gfs2_listxattr,
-	.removexattr = gfs2_removexattr,
-};
-
 const struct inode_operations gfs2_dir_iops = {
 	.create = gfs2_create,
 	.lookup = gfs2_lookup,
diff --git a/fs/gfs2/ops_inode.h b/fs/gfs2/ops_inode.h
index fd8cee2..14b4b79 100644
--- a/fs/gfs2/ops_inode.h
+++ b/fs/gfs2/ops_inode.h
@@ -15,7 +15,6 @@
 extern const struct inode_operations gfs2_file_iops;
 extern const struct inode_operations gfs2_dir_iops;
 extern const struct inode_operations gfs2_symlink_iops;
-extern const struct inode_operations gfs2_dev_iops;
 extern const struct file_operations gfs2_file_fops;
 extern const struct file_operations gfs2_dir_fops;
 extern const struct file_operations gfs2_file_fops_nolock;
-- 
1.5.4.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] [GFS2] re-support special inode
  2008-02-26  7:25 ` [PATCH 1/2] [GFS2] remove gfs2_dev_iops Denis Cheng
@ 2008-02-26  7:25   ` Denis Cheng
  2008-02-27 18:08   ` [PATCH 1/2] [GFS2] remove gfs2_dev_iops Steven Whitehouse
  1 sibling, 0 replies; 3+ messages in thread
From: Denis Cheng @ 2008-02-26  7:25 UTC (permalink / raw)
  To: Steven Whitehouse; +Cc: cluster-devel, linux-kernel

commit feaa7bba026c181ce071d5a4884f7f9dd26207a1 removed call to
init_special_inode from inode lookuping, this cause problems as:

 # mknod /mnt/gfs2/dev/null c 1 3
 # cat /mnt/gfs2/dev/null
 cat: /mnt/gfs2/dev/null: Invalid argument

without special inode, GFS2 cannot support char device file,
block device file, fifo pipe, and socket file, lose many important
features as a common file system.

this one line patch re add special inode support.

Signed-off-by: Denis Cheng <crquan@gmail.com>
---
 fs/gfs2/inode.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 1069ceb..18d8e0b 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -150,6 +150,7 @@ void gfs2_set_iop(struct inode *inode)
 		inode->i_op = &gfs2_symlink_iops;
 	} else {
 		inode->i_op = &gfs2_file_iops;
+		init_special_inode(inode, inode->i_mode, inode->i_rdev);
 	}
 
 	unlock_new_inode(inode);
-- 
1.5.4.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] [GFS2] remove gfs2_dev_iops
  2008-02-26  7:25 ` [PATCH 1/2] [GFS2] remove gfs2_dev_iops Denis Cheng
  2008-02-26  7:25   ` [PATCH 2/2] [GFS2] re-support special inode Denis Cheng
@ 2008-02-27 18:08   ` Steven Whitehouse
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Whitehouse @ 2008-02-27 18:08 UTC (permalink / raw)
  To: Denis Cheng; +Cc: cluster-devel, linux-kernel

Hi,

Both patches are now in the -nmw git tree. Sorry for the delay. I've
changed the comment on the second one since that commit ID didn't appear
to match up with the right patch.

Steve.

On Tue, 2008-02-26 at 15:25 +0800, Denis Cheng wrote:
> struct inode_operations gfs2_dev_iops is always the same as gfs2_file_iops,
> since Jan 2006, when GFS2 merged into mainstream kernel.
> 
> So one of them could be removed.
> 
> Signed-off-by: Denis Cheng <crquan@gmail.com>
> ---
>  fs/gfs2/inode.c     |    2 +-
>  fs/gfs2/ops_inode.c |   10 ----------
>  fs/gfs2/ops_inode.h |    1 -
>  3 files changed, 1 insertions(+), 12 deletions(-)
> 
> diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
> index 37725ad..1069ceb 100644
> --- a/fs/gfs2/inode.c
> +++ b/fs/gfs2/inode.c
> @@ -149,7 +149,7 @@ void gfs2_set_iop(struct inode *inode)
>  	} else if (S_ISLNK(mode)) {
>  		inode->i_op = &gfs2_symlink_iops;
>  	} else {
> -		inode->i_op = &gfs2_dev_iops;
> +		inode->i_op = &gfs2_file_iops;
>  	}
>  
>  	unlock_new_inode(inode);
> diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c
> index e874129..ab9a073 100644
> --- a/fs/gfs2/ops_inode.c
> +++ b/fs/gfs2/ops_inode.c
> @@ -1148,16 +1148,6 @@ const struct inode_operations gfs2_file_iops = {
>  	.removexattr = gfs2_removexattr,
>  };
>  
> -const struct inode_operations gfs2_dev_iops = {
> -	.permission = gfs2_permission,
> -	.setattr = gfs2_setattr,
> -	.getattr = gfs2_getattr,
> -	.setxattr = gfs2_setxattr,
> -	.getxattr = gfs2_getxattr,
> -	.listxattr = gfs2_listxattr,
> -	.removexattr = gfs2_removexattr,
> -};
> -
>  const struct inode_operations gfs2_dir_iops = {
>  	.create = gfs2_create,
>  	.lookup = gfs2_lookup,
> diff --git a/fs/gfs2/ops_inode.h b/fs/gfs2/ops_inode.h
> index fd8cee2..14b4b79 100644
> --- a/fs/gfs2/ops_inode.h
> +++ b/fs/gfs2/ops_inode.h
> @@ -15,7 +15,6 @@
>  extern const struct inode_operations gfs2_file_iops;
>  extern const struct inode_operations gfs2_dir_iops;
>  extern const struct inode_operations gfs2_symlink_iops;
> -extern const struct inode_operations gfs2_dev_iops;
>  extern const struct file_operations gfs2_file_fops;
>  extern const struct file_operations gfs2_dir_fops;
>  extern const struct file_operations gfs2_file_fops_nolock;


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-27 18:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] < <1204010704-11842-1-git-send-email-crquan@gmail.com>
2008-02-26  7:25 ` [PATCH 1/2] [GFS2] remove gfs2_dev_iops Denis Cheng
2008-02-26  7:25   ` [PATCH 2/2] [GFS2] re-support special inode Denis Cheng
2008-02-27 18:08   ` [PATCH 1/2] [GFS2] remove gfs2_dev_iops Steven Whitehouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).