LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/3] make static counters in new_inode and iunique be 32 bits
@ 2007-01-16 18:57 Jeff Layton
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Layton @ 2007-01-16 18:57 UTC (permalink / raw)
  To: akpm; +Cc: linux-fsdevel, linux-kernel

When a 32-bit program that was not compiled with large file offsets does a
stat and gets a st_ino value back that won't fit in the 32 bit field, glibc
(correctly) generates an EOVERFLOW error. We can't do anything about fs's
with larger permanent inode numbers, but when we generate them on the fly,
we ought to try and have them fit within a 32 bit field.

This patch takes the first step toward this by making the static counters in
these two functions be 32 bits.

Signed-off-by: Jeff Layton <jlayton@redhat.com>

diff --git a/fs/inode.c b/fs/inode.c
index bf21dc6..23fc1fd 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -524,7 +524,8 @@ repeat:
  */
 struct inode *new_inode(struct super_block *sb)
 {
-	static unsigned long last_ino;
+	/* 32 bits for compatability mode stat calls */
+	static unsigned int last_ino;
 	struct inode * inode;
 
 	spin_lock_prefetch(&inode_lock);
@@ -683,7 +684,8 @@ static unsigned long hash(struct super_block *sb, unsigned long hashval)
  */
 ino_t iunique(struct super_block *sb, ino_t max_reserved)
 {
-	static ino_t counter;
+	/* 32 bits for compatability mode stat calls */
+	static unsigned int counter;
 	struct inode *inode;
 	struct hlist_head * head;
 	ino_t res;

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

* Re: [PATCH 1/3] make static counters in new_inode and iunique be 32 bits
  2006-12-29 19:11 Jeff Layton
@ 2007-01-26 12:42 ` Kirill Korotaev
  0 siblings, 0 replies; 5+ messages in thread
From: Kirill Korotaev @ 2007-01-26 12:42 UTC (permalink / raw)
  To: Jeff Layton; +Cc: linux-fsdevel, linux-kernel

Acked-By: Kirill Korotaev <dev@openvz.org>

hit it today as well :/

> When a 32-bit program that was not compiled with large file offsets does a
> stat and gets a st_ino value back that won't fit in the 32 bit field, glibc
> (correctly) generates an EOVERFLOW error. We can't do anything about fs's
> with larger permanent inode numbers, but when we generate them on the fly,
> we ought to try and have them fit within a 32 bit field.
> 
> This patch takes the first step toward this by making the static counters in
> these two functions be 32 bits.
> 
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
> 
> diff --git a/fs/inode.c b/fs/inode.c
> index bf21dc6..23fc1fd 100644
> --- a/fs/inode.c
> +++ b/fs/inode.c
> @@ -524,7 +524,8 @@ repeat:
>   */
>  struct inode *new_inode(struct super_block *sb)
>  {
> -	static unsigned long last_ino;
> +	/* 32 bits for compatability mode stat calls */
> +	static unsigned int last_ino;
>  	struct inode * inode;
>  
>  	spin_lock_prefetch(&inode_lock);
> @@ -683,7 +684,8 @@ static unsigned long hash(struct super_block *sb, unsigned long hashval)
>   */
>  ino_t iunique(struct super_block *sb, ino_t max_reserved)
>  {
> -	static ino_t counter;
> +	/* 32 bits for compatability mode stat calls */
> +	static unsigned int counter;
>  	struct inode *inode;
>  	struct hlist_head * head;
>  	ino_t res;
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


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

* Re: [PATCH 1/3] make static counters in new_inode and iunique be 32 bits
  2007-01-08 20:47 Jeff Layton
@ 2007-01-10 21:21 ` Christoph Hellwig
  0 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2007-01-10 21:21 UTC (permalink / raw)
  To: Jeff Layton; +Cc: linux-fsdevel, linux-kernel, esandeen, aviro

On Mon, Jan 08, 2007 at 03:47:07PM -0500, Jeff Layton wrote:
> When a 32-bit program that was not compiled with large file offsets does a
> stat and gets a st_ino value back that won't fit in the 32 bit field, glibc
> (correctly) generates an EOVERFLOW error. We can't do anything about fs's
> with larger permanent inode numbers, but when we generate them on the fly,
> we ought to try and have them fit within a 32 bit field.
> 
> This patch takes the first step toward this by making the static counters in
> these two functions be 32 bits.
> 
> Signed-off-by: Jeff Layton <jlayton@redhat.com>

Ok.

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

* [PATCH 1/3] make static counters in new_inode and iunique be 32 bits
@ 2007-01-08 20:47 Jeff Layton
  2007-01-10 21:21 ` Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Layton @ 2007-01-08 20:47 UTC (permalink / raw)
  To: linux-fsdevel, linux-kernel; +Cc: esandeen, aviro

When a 32-bit program that was not compiled with large file offsets does a
stat and gets a st_ino value back that won't fit in the 32 bit field, glibc
(correctly) generates an EOVERFLOW error. We can't do anything about fs's
with larger permanent inode numbers, but when we generate them on the fly,
we ought to try and have them fit within a 32 bit field.

This patch takes the first step toward this by making the static counters in
these two functions be 32 bits.

Signed-off-by: Jeff Layton <jlayton@redhat.com>

diff --git a/fs/inode.c b/fs/inode.c
index bf21dc6..23fc1fd 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -524,7 +524,8 @@ repeat:
  */
 struct inode *new_inode(struct super_block *sb)
 {
-	static unsigned long last_ino;
+	/* 32 bits for compatability mode stat calls */
+	static unsigned int last_ino;
 	struct inode * inode;
 
 	spin_lock_prefetch(&inode_lock);
@@ -683,7 +684,8 @@ static unsigned long hash(struct super_block *sb, unsigned long hashval)
  */
 ino_t iunique(struct super_block *sb, ino_t max_reserved)
 {
-	static ino_t counter;
+	/* 32 bits for compatability mode stat calls */
+	static unsigned int counter;
 	struct inode *inode;
 	struct hlist_head * head;
 	ino_t res;

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

* [PATCH 1/3] make static counters in new_inode and iunique be 32 bits
@ 2006-12-29 19:11 Jeff Layton
  2007-01-26 12:42 ` Kirill Korotaev
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Layton @ 2006-12-29 19:11 UTC (permalink / raw)
  To: linux-fsdevel, linux-kernel

When a 32-bit program that was not compiled with large file offsets does a
stat and gets a st_ino value back that won't fit in the 32 bit field, glibc
(correctly) generates an EOVERFLOW error. We can't do anything about fs's
with larger permanent inode numbers, but when we generate them on the fly,
we ought to try and have them fit within a 32 bit field.

This patch takes the first step toward this by making the static counters in
these two functions be 32 bits.

Signed-off-by: Jeff Layton <jlayton@redhat.com>

diff --git a/fs/inode.c b/fs/inode.c
index bf21dc6..23fc1fd 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -524,7 +524,8 @@ repeat:
  */
 struct inode *new_inode(struct super_block *sb)
 {
-	static unsigned long last_ino;
+	/* 32 bits for compatability mode stat calls */
+	static unsigned int last_ino;
 	struct inode * inode;
 
 	spin_lock_prefetch(&inode_lock);
@@ -683,7 +684,8 @@ static unsigned long hash(struct super_block *sb, unsigned long hashval)
  */
 ino_t iunique(struct super_block *sb, ino_t max_reserved)
 {
-	static ino_t counter;
+	/* 32 bits for compatability mode stat calls */
+	static unsigned int counter;
 	struct inode *inode;
 	struct hlist_head * head;
 	ino_t res;

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

end of thread, other threads:[~2007-01-26 12:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-16 18:57 [PATCH 1/3] make static counters in new_inode and iunique be 32 bits Jeff Layton
  -- strict thread matches above, loose matches on Subject: below --
2007-01-08 20:47 Jeff Layton
2007-01-10 21:21 ` Christoph Hellwig
2006-12-29 19:11 Jeff Layton
2007-01-26 12:42 ` Kirill Korotaev

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).