All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Large disk support for XFS
@ 2009-08-16 19:46 Bean
  2009-08-16 19:49 ` Vladimir 'phcoder' Serbinenko
  2009-08-24 19:14 ` Vladimir 'phcoder' Serbinenko
  0 siblings, 2 replies; 13+ messages in thread
From: Bean @ 2009-08-16 19:46 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 151 bytes --]

Hi,

This patch fixes a few size limits of xfs fs.

-- 
Bean

gitgrub home: http://github.com/grub/grub/
my fork page: http://github.com/bean123/grub/

[-- Attachment #2: xfs.diff --]
[-- Type: text/x-patch, Size: 1445 bytes --]

diff --git a/fs/xfs.c b/fs/xfs.c
index a143b55..1b18bef 100644
--- a/fs/xfs.c
+++ b/fs/xfs.c
@@ -160,13 +160,13 @@ static grub_dl_t my_mod;
 #define GRUB_XFS_INO_AGBITS(data)		\
   ((data)->sblock.log2_agblk + (data)->sblock.log2_inop)
 #define GRUB_XFS_INO_INOINAG(data, ino)		\
-  (grub_be_to_cpu64 (ino) & ((1 << GRUB_XFS_INO_AGBITS (data)) - 1))
+  (grub_be_to_cpu64 (ino) & ((1LL << GRUB_XFS_INO_AGBITS (data)) - 1))
 #define GRUB_XFS_INO_AG(data,ino)		\
   (grub_be_to_cpu64 (ino) >> GRUB_XFS_INO_AGBITS (data))
 
 #define GRUB_XFS_FSB_TO_BLOCK(data, fsb) \
   (((fsb) >> (data)->sblock.log2_agblk) * (data)->agsize \
- + ((fsb) & ((1 << (data)->sblock.log2_agblk) - 1)))
+ + ((fsb) & ((1LL << (data)->sblock.log2_agblk) - 1)))
 
 #define GRUB_XFS_EXTENT_OFFSET(exts,ex) \
 	((grub_be_to_cpu32 (exts[ex][0]) & ~(1 << 31)) << 23 \
@@ -185,7 +185,7 @@ static grub_dl_t my_mod;
 #define GRUB_XFS_NEXT_DIRENT(pos,len)		\
   (pos) + GRUB_XFS_ROUND_TO_DIRENT (8 + 1 + len + 2)
 \f
-static inline int
+static inline grub_uint64_t
 grub_xfs_inode_block (struct grub_xfs_data *data,
 		      grub_uint64_t ino)
 {
@@ -213,7 +213,7 @@ static grub_err_t
 grub_xfs_read_inode (struct grub_xfs_data *data, grub_uint64_t ino,
 		     struct grub_xfs_inode *inode)
 {
-  int block = grub_xfs_inode_block (data, ino);
+  grub_uint64_t block = grub_xfs_inode_block (data, ino);
   int offset = grub_xfs_inode_offset (data, ino);
 
   /* Read the inode.  */

^ permalink raw reply related	[flat|nested] 13+ messages in thread
* Re: [PATCH] Large disk support for XFS
@ 2009-08-17  1:02 Monty Montgomery
  2009-08-17 10:09 ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 13+ messages in thread
From: Monty Montgomery @ 2009-08-17  1:02 UTC (permalink / raw)
  To: grub-devel

After applying the patch, "grub-probe -v -t fs /" and "grub-install
/dev/sda" both succeed without incident on the 6TB XFS volume.
However, upon reboot:

GRUB loading.
Welcome to GRUB!

Entering rescue mode....
error: out of disk
grub rescue>

At this point I tried 'help' and was told:

Unknown command 'help'
Try 'help' for usage
grub rescue>

...so something still appears to be wrong (perhaps between chair and monitor?)

Thanks for the help thusfar,
Monty



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

end of thread, other threads:[~2009-08-26 14:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-16 19:46 [PATCH] Large disk support for XFS Bean
2009-08-16 19:49 ` Vladimir 'phcoder' Serbinenko
2009-08-17 13:47   ` Robert Millan
2009-08-24 19:14 ` Vladimir 'phcoder' Serbinenko
2009-08-24 22:30   ` Robert Millan
2009-08-24 23:41     ` Vladimir 'phcoder' Serbinenko
2009-08-26  0:18       ` Robert Millan
2009-08-26 14:16         ` Bean
  -- strict thread matches above, loose matches on Subject: below --
2009-08-17  1:02 Monty Montgomery
2009-08-17 10:09 ` Vladimir 'phcoder' Serbinenko
2009-08-17 13:48   ` Robert Millan
2009-08-17 19:22   ` Monty Montgomery
2009-08-17 19:26     ` Felix Zielcke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.