Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/fs/udf Extract UDF metadata partition parameters as alre...



details:   https://anonhg.NetBSD.org/src/rev/ab268805f2c2
branches:  trunk
changeset: 752376:ab268805f2c2
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Wed Feb 24 19:14:12 2010 +0000

description:
Extract UDF metadata partition parameters as already done for VAT and sparable
partitions.

diffstat:

 sys/fs/udf/udf.h      |  4 +++-
 sys/fs/udf/udf_subr.c |  8 ++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diffs (47 lines):

diff -r 7d301be1b468 -r ab268805f2c2 sys/fs/udf/udf.h
--- a/sys/fs/udf/udf.h  Wed Feb 24 19:12:12 2010 +0000
+++ b/sys/fs/udf/udf.h  Wed Feb 24 19:14:12 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf.h,v 1.38 2009/08/05 13:45:48 reinoud Exp $ */
+/* $NetBSD: udf.h,v 1.39 2010/02/24 19:14:12 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -330,6 +330,8 @@
        struct udf_node         *metadatabitmap_node;   /* system node       */
        struct space_bitmap_desc*metadata_unalloc_dscr;
        struct udf_bitmap        metadata_unalloc_bits;
+       uint32_t                 alloc_unit_size;
+       uint16_t                 alignment_unit_size;
 
        /* rb tree for lookup icb to udf_node and sorted list for sync */
        kmutex_t        ihash_lock;
diff -r 7d301be1b468 -r ab268805f2c2 sys/fs/udf/udf_subr.c
--- a/sys/fs/udf/udf_subr.c     Wed Feb 24 19:12:12 2010 +0000
+++ b/sys/fs/udf/udf_subr.c     Wed Feb 24 19:14:12 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.101 2010/01/05 13:30:11 mbalmer Exp $ */
+/* $NetBSD: udf_subr.c,v 1.102 2010/02/24 19:14:12 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.101 2010/01/05 13:30:11 mbalmer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.102 2010/02/24 19:14:12 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -3118,6 +3118,10 @@
        struct vnode *vp;
        int error;
 
+       /* extract our allocation parameters set up on format */
+       ump->alloc_unit_size     = udf_rw32(mapping->pmm.alloc_unit_size);
+       ump->alignment_unit_size = udf_rw16(mapping->pmm.alignment_unit_size);
+
        DPRINTF(VOLUMES, ("Reading in Metadata files\n"));
        icb_loc.loc.part_num = pmm->part_num;
        icb_loc.loc.lb_num   = pmm->meta_file_lbn;



Home | Main Index | Thread Index | Old Index