zfs preview
hello, here is initial port of zfs from grub-solaris. It can only read file by its name. No ls or tab completition yet. Also identation and error handling in this patch is completely wrong. To choose the dataset set zfs variable. Here is an example of how I tested it:
grub> zfs=grubz/grubzfs
grub> cat (hd0)/hello
hello, grub
grub>
Such syntax is temporary and heavily restricts what you can do with different zfs filesystems (e.g. you can't cmp files on different filesystems)
I propose the following syntax for the future:
(<one of vdevs>:<fs name>)
E.g.
(hd0:grubzfs)
Any other porposition?
Regards
Vladimir 'phcoder' Serbinenko
conf/common.rmk +7 -2
@@ -38,7 +38,7 @@ grub_fstest_SOURCES = util/grub-fstest.c util/hostfs.c util/misc.c \ fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \ fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \ fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \ - fs/ufs.c fs/xfs.c fs/afs.c fs/tar.c \ + fs/ufs.c fs/xfs.c fs/afs.c fs/tar.c \ \ kern/partition.c partmap/pc.c partmap/apple.c partmap/sun.c \ partmap/gpt.c \
@@ -167,7 +167,7 @@ CLEANFILES += grub-dumpbios pkglib_MODULES += fshelp.mod fat.mod ufs.mod ext2.mod ntfs.mod \ ntfscomp.mod minix.mod hfs.mod jfs.mod iso9660.mod xfs.mod \ affs.mod sfs.mod hfsplus.mod reiserfs.mod cpio.mod tar.mod \ - udf.mod afs.mod + udf.mod afs.mod zfs.mod # For fshelp.mod. fshelp_mod_SOURCES = fs/fshelp.c
@@ -179,6 +179,11 @@ fat_mod_SOURCES = fs/fat.c fat_mod_CFLAGS = $(COMMON_CFLAGS) fat_mod_LDFLAGS = $(COMMON_LDFLAGS) +# For zfs.mod. +zfs_mod_SOURCES = fs/zfs.c fs/zfs_lzjb.c fs/zfs_sha256.c fs/zfs_fletcher.c +zfs_mod_CFLAGS = $(COMMON_CFLAGS) +zfs_mod_LDFLAGS = $(COMMON_LDFLAGS) + # For ufs.mod. ufs_mod_SOURCES = fs/ufs.c ufs_mod_CFLAGS = $(COMMON_CFLAGS)
conf/i386-pc.rmk +2 -1
@@ -147,7 +147,8 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \ fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \ fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \ - fs/ufs.c fs/xfs.c fs/afs.c fs/tar.c \ + fs/ufs.c fs/xfs.c fs/zfs.c fs/zfs_lzjb.c fs/zfs_sha256.c \ + fs/zfs_fletcher.c fs/afs.c fs/tar.c \ \ util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ util/hostdisk.c util/getroot.c \
fs/zfs.c new file +1787 -0
1,787 lines not on this page · raw message
fs/zfs_fletcher.c new file +111 -0
111 lines not on this page · raw message
fs/zfs_lzjb.c new file +87 -0
87 lines not on this page · raw message
fs/zfs_sha256.c new file +143 -0
143 lines not on this page · raw message
include/grub/zfs/dmu.h new file +105 -0
105 lines not on this page · raw message
include/grub/zfs/dmu_objset.h new file +37 -0
@@ -0,0 +1,37 @@ +/* +* GRUB -- GRand Unified Bootloader +* Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +/* +* Copyright 2007 Sun Microsystems, Inc. All rights reserved. +* Use is subject to license terms. +*/ + +#ifndef _SYS_DMU_OBJSET_H +#define _SYS_DMU_OBJSET_H + +#include <grub/zfs/zil.h> + +typedef struct objset_phys { +dnode_phys_t os_meta_dnode; +zil_header_t os_zil_header; +grub_uint64_t os_type; +char os_pad[1024 -sizeof (dnode_phys_t) -sizeof (zil_header_t) - +sizeof (grub_uint64_t)]; +}objset_phys_t ; + +#endif /* _SYS_DMU_OBJSET_H */
include/grub/zfs/dnode.h new file +78 -0
78 lines not on this page · raw message
include/grub/zfs/dsl_dataset.h new file +53 -0
53 lines not on this page · raw message
include/grub/zfs/dsl_dir.h new file +49 -0
49 lines not on this page · raw message
include/grub/zfs/spa.h new file +283 -0
283 lines not on this page · raw message
include/grub/zfs/uberblock_impl.h new file +66 -0
66 lines not on this page · raw message
include/grub/zfs/vdev_impl.h new file +70 -0
70 lines not on this page · raw message
include/grub/zfs/zap_impl.h new file +110 -0
95 lines not on this page · raw message
include/grub/zfs/zap_leaf.h new file +100 -0
100 lines not on this page · raw message
include/grub/zfs/zfs.h new file +108 -0
108 lines not on this page · raw message
include/grub/zfs/zfs_acl.h new file +60 -0
60 lines not on this page · raw message
include/grub/zfs/zfs_znode.h new file +70 -0
70 lines not on this page · raw message
include/grub/zfs/zil.h new file +51 -0
51 lines not on this page · raw message
include/grub/zfs/zio.h new file +83 -0
83 lines not on this page · raw message
include/grub/zfs/zio_checksum.h new file +43 -0
43 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Excellent, thanks.
Haven't had a chance to test it yet, but I'm sure phcoder will be interested!
He told me he's been making his own port, so maybe he can fix this one up instead!
Good Luck
Panarchy
Quoted 25 lines · Vladimir Serbinenko
hello, here is initial port of zfs from grub-solaris. It can only read file by its name. No ls or tab completition yet. Also identation and error handling in this patch is completely wrong. To choose the dataset set zfs variable. Here is an example of how I tested it:
grub> zfs=grubz/grubzfs
grub> cat (hd0)/hello
hello, grub
grub>
Such syntax is temporary and heavily restricts what you can do with different zfs filesystems (e.g. you can't cmp files on different filesystems)
I propose the following syntax for the future:
(<one of vdevs>:<fs name>)
E.g.
(hd0:grubzfs)
Any other porposition?
Regards
Vladimir 'phcoder' Serbinenko_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 1 line · Chip Panarchy
Haven't had a chance to test it yet, but I'm sure phcoder will be interested!
He surely will, yes... if you take into account that phcoder /is/ Vladimir.
Jordi
Signature · 3 lines
Jordi Mallach Pérez -- Debian developer http://www.debian.org/ [email protected] [email protected] http://www.sindominio.net/ GnuPG public key information available at http://oskuro.net/
From: Jordi Mallach <[email protected]>
Date: Sun, 26 Apr 2009 02:58:47 +0200
Quoted 1 line
He surely will, yes... if you take into account that phcoder /is/ Vladimir.
This reminds me that I've had some serious trouble finding posting in the archives because his postings show up under more than one name :-/
Unfortunately, email is certainly not his forte'
Hahahaha, no wonder I'm confused!
Quoted 17 lines · David Miller
From: Jordi Mallach <[email protected]>
Date: Sun, 26 Apr 2009 02:58:47 +0200Quoted 1 line
He surely will, yes... if you take into account that phcoder /is/ Vladimir.
This reminds me that I've had some serious trouble finding posting in the archives because his postings show up under more than one name :-/
Unfortunately, email is certainly not his forte'
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 10 lines · David Miller
From: Jordi Mallach <[email protected]>
Date: Sun, 26 Apr 2009 02:58:47 +0200Quoted 1 line
He surely will, yes... if you take into account that phcoder /is/
Vladimir.
This reminds me that I've had some serious trouble finding posting in the archives because his postings show up under more than one name :-/
I recently switched to another mailer and so the sender name changed from 'phcoder' to "Vladimir Serbinenko". Now I changed it to "Vladimir 'phcoder' Serbinenko" in hope to avoid further confusion. Thanks for pointing out.
Quoted 9 lines
Unfortunately, email is certainly not his forte'
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Ah, okay. Becoming a little clearer now.
Well anyways, really interested in seeing this ZFS package implemented, so let's get back-on-topic!!!
Panarchy
Quoted 33 lines · Vladimir 'phcoder' Serbinenko
Quoted 10 lines · David Miller
From: Jordi Mallach <[email protected]>
Date: Sun, 26 Apr 2009 02:58:47 +0200Quoted 2 lines
He surely will, yes... if you take into account that phcoder /is/ Vladimir.
This reminds me that I've had some serious trouble finding posting in the archives because his postings show up under more than one name :-/
I recently switched to another mailer and so the sender name changed from 'phcoder' to "Vladimir Serbinenko". Now I changed it to "Vladimir 'phcoder' Serbinenko" in hope to avoid further confusion. Thanks for pointing out.
Quoted 8 lines
Unfortunately, email is certainly not his forte'
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel