CVS commit: src/sys/fs/udf

2024-05-17 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat May 18 00:04:01 UTC 2024

Modified Files:
src/sys/fs/udf: udf.h udf_rename.c

Log Message:
Move the include of  to where it's truly needed.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/fs/udf/udf.h
cvs rdiff -u -r1.15 -r1.16 src/sys/fs/udf/udf_rename.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf.h
diff -u src/sys/fs/udf/udf.h:1.55 src/sys/fs/udf/udf.h:1.56
--- src/sys/fs/udf/udf.h:1.55	Tue Jun 27 09:58:50 2023
+++ src/sys/fs/udf/udf.h	Sat May 18 00:04:01 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: udf.h,v 1.55 2023/06/27 09:58:50 reinoud Exp $ */
+/* $NetBSD: udf.h,v 1.56 2024/05/18 00:04:01 thorpej Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 /* debug section */

Index: src/sys/fs/udf/udf_rename.c
diff -u src/sys/fs/udf/udf_rename.c:1.15 src/sys/fs/udf/udf_rename.c:1.16
--- src/sys/fs/udf/udf_rename.c:1.15	Fri Jun  2 08:51:48 2023
+++ src/sys/fs/udf/udf_rename.c	Sat May 18 00:04:01 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_rename.c,v 1.15 2023/06/02 08:51:48 andvar Exp $ */
+/* $NetBSD: udf_rename.c,v 1.16 2024/05/18 00:04:01 thorpej Exp $ */
 
 /*
  * Copyright (c) 2013 Reinoud Zandijk
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: udf_rename.c,v 1.15 2023/06/02 08:51:48 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_rename.c,v 1.16 2024/05/18 00:04:01 thorpej Exp $");
 
 #include 
 #include 
@@ -36,7 +36,6 @@ __KERNEL_RCSID(0, "$NetBSD: udf_rename.c
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 



CVS commit: src/sys/fs/udf

2024-05-17 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat May 18 00:04:01 UTC 2024

Modified Files:
src/sys/fs/udf: udf.h udf_rename.c

Log Message:
Move the include of  to where it's truly needed.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/fs/udf/udf.h
cvs rdiff -u -r1.15 -r1.16 src/sys/fs/udf/udf_rename.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2023-06-27 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Tue Jun 27 09:58:50 UTC 2023

Modified Files:
src/sys/fs/udf: udf.h udf_strat_direct.c udf_strat_rmw.c
udf_strat_sequential.c udf_vnops.c

Log Message:
Convert UDF file system code from the depricated tsleep(9)/wakeup(9) to the MP
friendly condvar(9). No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/fs/udf/udf.h
cvs rdiff -u -r1.15 -r1.16 src/sys/fs/udf/udf_strat_direct.c
cvs rdiff -u -r1.30 -r1.31 src/sys/fs/udf/udf_strat_rmw.c
cvs rdiff -u -r1.19 -r1.20 src/sys/fs/udf/udf_strat_sequential.c
cvs rdiff -u -r1.126 -r1.127 src/sys/fs/udf/udf_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2023-06-27 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Tue Jun 27 09:58:50 UTC 2023

Modified Files:
src/sys/fs/udf: udf.h udf_strat_direct.c udf_strat_rmw.c
udf_strat_sequential.c udf_vnops.c

Log Message:
Convert UDF file system code from the depricated tsleep(9)/wakeup(9) to the MP
friendly condvar(9). No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/fs/udf/udf.h
cvs rdiff -u -r1.15 -r1.16 src/sys/fs/udf/udf_strat_direct.c
cvs rdiff -u -r1.30 -r1.31 src/sys/fs/udf/udf_strat_rmw.c
cvs rdiff -u -r1.19 -r1.20 src/sys/fs/udf/udf_strat_sequential.c
cvs rdiff -u -r1.126 -r1.127 src/sys/fs/udf/udf_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf.h
diff -u src/sys/fs/udf/udf.h:1.54 src/sys/fs/udf/udf.h:1.55
--- src/sys/fs/udf/udf.h:1.54	Sun Aug  7 11:06:19 2022
+++ src/sys/fs/udf/udf.h	Tue Jun 27 09:58:50 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: udf.h,v 1.54 2022/08/07 11:06:19 andvar Exp $ */
+/* $NetBSD: udf.h,v 1.55 2023/06/27 09:58:50 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -76,7 +76,9 @@ extern int udf_verbose;
 #define UDF_DEBUG_RESERVE	0x100
 
 /* initial value of udf_verbose */
-#define UDF_DEBUGGING		(0)
+#define UDF_DEBUGGING		(0x000)
+//#define UDF_DEBUGGING		(0x02f)
+
 
 #ifdef UDF_DEBUG
 #define DPRINTF(name, arg) { \

Index: src/sys/fs/udf/udf_strat_direct.c
diff -u src/sys/fs/udf/udf_strat_direct.c:1.15 src/sys/fs/udf/udf_strat_direct.c:1.16
--- src/sys/fs/udf/udf_strat_direct.c:1.15	Sat Jan 15 10:55:53 2022
+++ src/sys/fs/udf/udf_strat_direct.c	Tue Jun 27 09:58:50 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_strat_direct.c,v 1.15 2022/01/15 10:55:53 msaitoh Exp $ */
+/* $NetBSD: udf_strat_direct.c,v 1.16 2023/06/27 09:58:50 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_strat_direct.c,v 1.15 2022/01/15 10:55:53 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_strat_direct.c,v 1.16 2023/06/27 09:58:50 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -116,7 +116,7 @@ udf_wr_nodedscr_callback(struct buf *buf
 	if (udf_node->outstanding_nodedscr == 0) {
 		/* unlock the node */
 		UDF_UNLOCK_NODE(udf_node, 0);
-		wakeup(&udf_node->outstanding_nodedscr);
+		cv_broadcast(&udf_node->node_lock);
 	}
 
 	putiobuf(buf);
@@ -223,7 +223,7 @@ out:
 	udf_node->outstanding_nodedscr--;
 	if (udf_node->outstanding_nodedscr == 0) {
 		UDF_UNLOCK_NODE(udf_node, 0);
-		wakeup(&udf_node->outstanding_nodedscr);
+		cv_broadcast(&udf_node->node_lock);
 	}
 
 	return error;

Index: src/sys/fs/udf/udf_strat_rmw.c
diff -u src/sys/fs/udf/udf_strat_rmw.c:1.30 src/sys/fs/udf/udf_strat_rmw.c:1.31
--- src/sys/fs/udf/udf_strat_rmw.c:1.30	Sat Jan 15 10:55:53 2022
+++ src/sys/fs/udf/udf_strat_rmw.c	Tue Jun 27 09:58:50 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_strat_rmw.c,v 1.30 2022/01/15 10:55:53 msaitoh Exp $ */
+/* $NetBSD: udf_strat_rmw.c,v 1.31 2023/06/27 09:58:50 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_strat_rmw.c,v 1.30 2022/01/15 10:55:53 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_strat_rmw.c,v 1.31 2023/06/27 09:58:50 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -756,7 +756,7 @@ udf_write_nodedscr_rmw(struct udf_strat_
 	if (udf_node->outstanding_nodedscr == 0) {
 		/* XXX still using wakeup! */
 		UDF_UNLOCK_NODE(udf_node, 0);
-		wakeup(&udf_node->outstanding_nodedscr);
+		cv_broadcast(&udf_node->node_lock);
 	}
 	udf_puteccline(eccline);
 
@@ -1205,6 +1205,8 @@ udf_discstrat_thread(void *arg)
 
 	work = 1;
 	priv->thread_running = 1;
+	cv_broadcast(&priv->discstrat_cv);
+
 	mutex_enter(&priv->discstrat_mutex);
 	priv->num_floating = 0;
 	while (priv->run_thread || work || priv->num_floating) {
@@ -1356,7 +1358,8 @@ udf_discstrat_thread(void *arg)
 
 	priv->thread_running  = 0;
 	priv->thread_finished = 1;
-	wakeup(&priv->run_thread);
+	cv_broadcast(&priv->discstrat_cv);
+
 	kthread_exit(0);
 	/* not reached */
 }
@@ -1459,9 +1462,11 @@ udf_discstrat_init_rmw(struct udf_strat_
 	}
 
 	/* wait for thread to spin up */
+	mutex_enter(&priv->discstrat_mutex);
 	while (!priv->thread_running) {
-		tsleep(&priv->thread_running, PRIBIO+1, "udfshedstart", hz);
+		cv_timedwait(&priv->discstrat_cv, &priv->discstrat_mutex, hz);
 	}
+	mutex_exit(&priv->discstrat_mutex);
 }
 
 
@@ -1477,20 +1482,23 @@ udf_discstrat_finish_rmw(struct udf_stra
 	/* stop our sheduling thread */
 	KASSERT(priv->run_thread == 1);
 	priv->run_thread = 0;
-	wakeup(priv->queue_lwp);
+
+	mutex_enter(&priv->discstrat_mutex);
 	while (!priv->thread_finished) {
-		tsleep(&priv->run_thread, PRIBIO + 1, "udfshedfin", hz);
+		cv_broadcast(&priv->discstrat_cv);
+		cv_timedwait(&priv->discstrat_cv, &priv->discstrat_mutex, hz);
 	}
+	mutex_exit

CVS commit: src/sys/fs/udf

2022-08-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Aug 27 05:32:41 UTC 2022

Modified Files:
src/sys/fs/udf: udf_strat_sequential.c

Log Message:
Spell approximately correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/fs/udf/udf_strat_sequential.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_strat_sequential.c
diff -u src/sys/fs/udf/udf_strat_sequential.c:1.18 src/sys/fs/udf/udf_strat_sequential.c:1.19
--- src/sys/fs/udf/udf_strat_sequential.c:1.18	Sat Aug 27 05:31:59 2022
+++ src/sys/fs/udf/udf_strat_sequential.c	Sat Aug 27 05:32:41 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_strat_sequential.c,v 1.18 2022/08/27 05:31:59 skrll Exp $ */
+/* $NetBSD: udf_strat_sequential.c,v 1.19 2022/08/27 05:32:41 skrll Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_strat_sequential.c,v 1.18 2022/08/27 05:31:59 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_strat_sequential.c,v 1.19 2022/08/27 05:32:41 skrll Exp $");
 #endif /* not lint */
 
 
@@ -249,7 +249,7 @@ out:
  * kinds of side effects.
  *
  * This implementation uses a kernel thread to schedule the queued requests in
- * such a way that is semi-optimal for optical media; this means aproximately
+ * such a way that is semi-optimal for optical media; this means approximately
  * (R*|(Wr*|Ws*))* since switching between reading and writing is expensive in
  * time.
  */



CVS commit: src/sys/fs/udf

2022-08-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Aug 27 05:32:41 UTC 2022

Modified Files:
src/sys/fs/udf: udf_strat_sequential.c

Log Message:
Spell approximately correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/fs/udf/udf_strat_sequential.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2022-08-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Aug 27 05:31:59 UTC 2022

Modified Files:
src/sys/fs/udf: udf_strat_sequential.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/fs/udf/udf_strat_sequential.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2022-08-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Aug 27 05:31:59 UTC 2022

Modified Files:
src/sys/fs/udf: udf_strat_sequential.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/fs/udf/udf_strat_sequential.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_strat_sequential.c
diff -u src/sys/fs/udf/udf_strat_sequential.c:1.17 src/sys/fs/udf/udf_strat_sequential.c:1.18
--- src/sys/fs/udf/udf_strat_sequential.c:1.17	Sat Apr 16 18:15:22 2022
+++ src/sys/fs/udf/udf_strat_sequential.c	Sat Aug 27 05:31:59 2022
@@ -1,9 +1,9 @@
-/* $NetBSD: udf_strat_sequential.c,v 1.17 2022/04/16 18:15:22 andvar Exp $ */
+/* $NetBSD: udf_strat_sequential.c,v 1.18 2022/08/27 05:31:59 skrll Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -12,7 +12,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
@@ -23,12 +23,12 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- * 
+ *
  */
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_strat_sequential.c,v 1.17 2022/04/16 18:15:22 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_strat_sequential.c,v 1.18 2022/08/27 05:31:59 skrll Exp $");
 #endif /* not lint */
 
 
@@ -205,7 +205,7 @@ udf_write_logvol_dscr_seq(struct udf_str
 	int error, vpart;
 
 	/*
-	 * we have to decide if we write it out sequential or at its fixed 
+	 * we have to decide if we write it out sequential or at its fixed
 	 * position by examining the partition its (to be) written on.
 	 */
 	vpart   = udf_rw16(udf_node->loc.loc.part_num);
@@ -712,5 +712,5 @@ struct udf_strategy udf_strat_sequential
 	udf_discstrat_init_seq,
 	udf_discstrat_finish_seq
 };
-	
+
 



CVS commit: src/sys/fs/udf

2022-05-03 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Tue May  3 07:35:43 UTC 2022

Modified Files:
src/sys/fs/udf: udf_vnops.c

Log Message:
No IO_NODELOCKED for unlocked vnode.


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/fs/udf/udf_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2022-05-03 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Tue May  3 07:35:43 UTC 2022

Modified Files:
src/sys/fs/udf: udf_vnops.c

Log Message:
No IO_NODELOCKED for unlocked vnode.


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/fs/udf/udf_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_vnops.c
diff -u src/sys/fs/udf/udf_vnops.c:1.123 src/sys/fs/udf/udf_vnops.c:1.124
--- src/sys/fs/udf/udf_vnops.c:1.123	Sun Apr 10 09:50:46 2022
+++ src/sys/fs/udf/udf_vnops.c	Tue May  3 07:35:43 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_vnops.c,v 1.123 2022/04/10 09:50:46 andvar Exp $ */
+/* $NetBSD: udf_vnops.c,v 1.124 2022/05/03 07:35:43 hannken Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -32,7 +32,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_vnops.c,v 1.123 2022/04/10 09:50:46 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_vnops.c,v 1.124 2022/05/03 07:35:43 hannken Exp $");
 #endif /* not lint */
 
 
@@ -1701,7 +1701,7 @@ udf_do_symlink(struct udf_node *udf_node
 	/* write out structure on the new file */
 	error = vn_rdwr(UIO_WRITE, udf_node->vnode,
 		pathbuf, pathlen, 0,
-		UIO_SYSSPACE, IO_NODELOCKED | IO_ALTSEMANTICS,
+		UIO_SYSSPACE, IO_ALTSEMANTICS,
 		FSCRED, NULL, NULL);
 
 	/* return status of symlink contents writeout */



CVS commit: src/sys/fs/udf

2022-04-22 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Apr 22 21:21:10 UTC 2022

Modified Files:
src/sys/fs/udf: udf_subr.c

Log Message:
Fix endian issue with UDF extended attribute handling


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.169 src/sys/fs/udf/udf_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_subr.c
diff -u src/sys/fs/udf/udf_subr.c:1.168 src/sys/fs/udf/udf_subr.c:1.169
--- src/sys/fs/udf/udf_subr.c:1.168	Sun Apr 10 09:50:46 2022
+++ src/sys/fs/udf/udf_subr.c	Fri Apr 22 21:21:10 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.168 2022/04/10 09:50:46 andvar Exp $ */
+/* $NetBSD: udf_subr.c,v 1.169 2022/04/22 21:21:10 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.168 2022/04/10 09:50:46 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.169 2022/04/22 21:21:10 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -2439,11 +2439,11 @@ udf_extattr_search_intern(struct udf_nod
 		if ((a_l == 0) || (a_l > l_ea))
 			return EINVAL;
 
-		if (attrhdr->type != sattr)
+		if (udf_rw32(attrhdr->type) != sattr)
 			goto next_attribute;
 
 		/* we might have found it! */
-		if (attrhdr->type < 2048) {	/* Ecma-167 attribute */
+		if (udf_rw32(attrhdr->type) < 2048) {	/* Ecma-167 attribute */
 			*offsetp = offset;
 			*lengthp = a_l;
 			return 0;		/* success */



CVS commit: src/sys/fs/udf

2022-04-22 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Apr 22 21:21:10 UTC 2022

Modified Files:
src/sys/fs/udf: udf_subr.c

Log Message:
Fix endian issue with UDF extended attribute handling


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.169 src/sys/fs/udf/udf_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2022-04-01 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Apr  1 08:26:28 UTC 2022

Modified Files:
src/sys/fs/udf: udf_vnops.c

Log Message:
Fix malformed DPRINTF() macro


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/fs/udf/udf_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_vnops.c
diff -u src/sys/fs/udf/udf_vnops.c:1.121 src/sys/fs/udf/udf_vnops.c:1.122
--- src/sys/fs/udf/udf_vnops.c:1.121	Wed Mar 30 13:23:59 2022
+++ src/sys/fs/udf/udf_vnops.c	Fri Apr  1 08:26:27 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_vnops.c,v 1.121 2022/03/30 13:23:59 christos Exp $ */
+/* $NetBSD: udf_vnops.c,v 1.122 2022/04/01 08:26:27 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -32,7 +32,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_vnops.c,v 1.121 2022/03/30 13:23:59 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_vnops.c,v 1.122 2022/04/01 08:26:27 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -1567,7 +1567,7 @@ udf_link(void *v)
 	udf_node = VTOI(vp);
 
 	if ((error = vn_lock(vp, LK_EXCLUSIVE))) {
-		DPRINTF("lock failed. %p\n", vp);
+		DPRINTF(LOCKING, ("exclusive lock failed for vnode %p\n", vp));
 		goto out;
 	}
 



CVS commit: src/sys/fs/udf

2022-04-01 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Apr  1 08:26:28 UTC 2022

Modified Files:
src/sys/fs/udf: udf_vnops.c

Log Message:
Fix malformed DPRINTF() macro


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/fs/udf/udf_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2022-03-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 30 13:24:00 UTC 2022

Modified Files:
src/sys/fs/udf: udf_vnops.c

Log Message:
Fix locking in udf_link(). XXX: udf_symlink is prolly similarly broken.


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/sys/fs/udf/udf_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_vnops.c
diff -u src/sys/fs/udf/udf_vnops.c:1.120 src/sys/fs/udf/udf_vnops.c:1.121
--- src/sys/fs/udf/udf_vnops.c:1.120	Sun Mar 27 12:24:58 2022
+++ src/sys/fs/udf/udf_vnops.c	Wed Mar 30 09:23:59 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_vnops.c,v 1.120 2022/03/27 16:24:58 christos Exp $ */
+/* $NetBSD: udf_vnops.c,v 1.121 2022/03/30 13:23:59 christos Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -32,7 +32,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_vnops.c,v 1.120 2022/03/27 16:24:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_vnops.c,v 1.121 2022/03/30 13:23:59 christos Exp $");
 #endif /* not lint */
 
 
@@ -1542,12 +1542,20 @@ udf_mkdir(void *v)
 
 /* - */
 
-static int
-udf_do_link(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
+int
+udf_link(void *v)
 {
+	struct vop_link_v2_args /* {
+		struct vnode *a_dvp;
+		struct vnode *a_vp;
+		struct componentname *a_cnp;
+	} */ *ap = v;
+	struct vnode *dvp = ap->a_dvp;
+	struct vnode *vp  = ap->a_vp;
+	struct componentname *cnp = ap->a_cnp;
 	struct udf_node *udf_node, *dir_node;
 	struct vattr vap;
-	int error;
+	int error, abrt = 1;
 
 	DPRINTF(CALL, ("udf_link called\n"));
 	KASSERT(dvp != vp);
@@ -1558,44 +1566,31 @@ udf_do_link(struct vnode *dvp, struct vn
 	dir_node = VTOI(dvp);
 	udf_node = VTOI(vp);
 
+	if ((error = vn_lock(vp, LK_EXCLUSIVE))) {
+		DPRINTF("lock failed. %p\n", vp);
+		goto out;
+	}
+
 	error = VOP_GETATTR(vp, &vap, FSCRED);
 	if (error)
-		goto out;
+		goto out1;
 
 	/* check link count overflow */
 	if (vap.va_nlink >= (1<<16)-1) {	/* uint16_t */
 		error = EMLINK;
-		goto out;
+		goto out1;
 	}
 	error = kauth_authorize_vnode(cnp->cn_cred, KAUTH_VNODE_ADD_LINK, vp,
 	dvp, 0);
 	if (error)
-		goto out;
-
+		goto out1;
+	abrt = 0;
 	error = udf_dir_attach(dir_node->ump, dir_node, udf_node, &vap, cnp);
+out1:
+	VOP_UNLOCK(vp);
 out:
-	if (error)
-		VOP_UNLOCK(vp);
-	return error;
-}
-
-int
-udf_link(void *v)
-{
-	struct vop_link_v2_args /* {
-		struct vnode *a_dvp;
-		struct vnode *a_vp;
-		struct componentname *a_cnp;
-	} */ *ap = v;
-	struct vnode *dvp = ap->a_dvp;
-	struct vnode *vp  = ap->a_vp;
-	struct componentname *cnp = ap->a_cnp;
-	int error;
-
-	error = udf_do_link(dvp, vp, cnp);
-	if (error)
+	if (abrt)
 		VOP_ABORTOP(dvp, cnp);
-
 	return error;
 }
 



CVS commit: src/sys/fs/udf

2022-03-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 30 13:24:00 UTC 2022

Modified Files:
src/sys/fs/udf: udf_vnops.c

Log Message:
Fix locking in udf_link(). XXX: udf_symlink is prolly similarly broken.


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/sys/fs/udf/udf_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/fs/udf

2022-03-18 Thread Joerg Sonnenberger
Am Fri, Mar 18, 2022 at 04:06:18PM + schrieb Reinoud Zandijk:
> Module Name:  src
> Committed By: reinoud
> Date: Fri Mar 18 16:06:18 UTC 2022
> 
> Modified Files:
>   src/sys/fs/udf: ecma167-udf.h
> 
> Log Message:
> Replace the variable field data[0] to data[1] to avoid undefined behaviour.

Just use a flexible array member, data[]. That gives essentially the
same behavior as the ancient GNU extension of [0] but sanitizers knows
what it means. That said, it is somewhat pointless in a packed data
structure...

Joerg


CVS commit: src/sys/fs/udf

2022-03-18 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Mar 18 16:06:18 UTC 2022

Modified Files:
src/sys/fs/udf: ecma167-udf.h

Log Message:
Replace the variable field data[0] to data[1] to avoid undefined behaviour.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/fs/udf/ecma167-udf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/ecma167-udf.h
diff -u src/sys/fs/udf/ecma167-udf.h:1.16 src/sys/fs/udf/ecma167-udf.h:1.17
--- src/sys/fs/udf/ecma167-udf.h:1.16	Thu Aug  9 13:49:30 2018
+++ src/sys/fs/udf/ecma167-udf.h	Fri Mar 18 16:06:18 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: ecma167-udf.h,v 1.16 2018/08/09 13:49:30 reinoud Exp $ */
+/* $NetBSD: ecma167-udf.h,v 1.17 2022/03/18 16:06:18 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2003, 2004, 2005, 2006, 2008, 2009, 2017, 2018
@@ -651,7 +651,7 @@ struct fileid_desc {
 	uint8_t			l_fi;	/* Length of file identifier area */
 	struct long_ad		icb;
 	uint16_t		l_iu;	/* Length of implementation use area */
-	uint8_t			data[0];
+	uint8_t			data[1];
 } __packed;
 #define	UDF_FID_SIZE	38
 #define	UDF_FILE_CHAR_VIS	(1 << 0) /* Invisible */



CVS commit: src/sys/fs/udf

2022-03-18 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Mar 18 16:06:18 UTC 2022

Modified Files:
src/sys/fs/udf: ecma167-udf.h

Log Message:
Replace the variable field data[0] to data[1] to avoid undefined behaviour.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/fs/udf/ecma167-udf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2022-03-08 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Tue Mar  8 18:30:43 UTC 2022

Modified Files:
src/sys/fs/udf: udf_subr.c

Log Message:
For bug-compatibility with Windows, the last VAT sector must be a multiple of
16/32 from the start of the track.  To allow for scratches, write out at least
a 32 pieces.


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.167 src/sys/fs/udf/udf_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_subr.c
diff -u src/sys/fs/udf/udf_subr.c:1.166 src/sys/fs/udf/udf_subr.c:1.167
--- src/sys/fs/udf/udf_subr.c:1.166	Sun Feb  6 20:20:19 2022
+++ src/sys/fs/udf/udf_subr.c	Tue Mar  8 18:30:43 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.166 2022/02/06 20:20:19 andvar Exp $ */
+/* $NetBSD: udf_subr.c,v 1.167 2022/03/08 18:30:43 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.166 2022/02/06 20:20:19 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.167 2022/03/08 18:30:43 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -3797,10 +3797,11 @@ udf_close_logvol(struct udf_mount *ump, 
 {
 	struct vnode *devvp = ump->devvp;
 	struct mmc_op mmc_op;
+	uint32_t phys;
 	int logvol_integrity;
 	int error = 0, error1 = 0, error2 = 0;
 	int tracknr;
-	int nvats, n, nok;
+	int nvats, n, relblk, wrtrack_skew, nok;
 
 	/* already/still closed? */
 	logvol_integrity = udf_rw32(ump->logvol_integrity->integrity_type);
@@ -3821,8 +3822,17 @@ udf_close_logvol(struct udf_mount *ump, 
 		DPRINTF(VOLUMES, ("writeout vat_node\n"));
 		udf_writeout_vat(ump);
 
-		/* at least two DVD packets and 3 CD-R packets */
-		nvats = 32;
+		/*
+		 * For bug-compatibility with Windows, the last VAT sector
+		 * must be a multiple of 16/32 from the start of the track.
+		 * To allow for scratches, write out at least a 32 pieces.
+		 */
+		phys = ump->data_track.track_start;
+		wrtrack_skew = phys % 32;
+
+		phys = ump->data_track.next_writable;
+		relblk = phys % 32;
+		nvats = 32 + 32 - (relblk - wrtrack_skew);
 
 #if notyet
 		/*



CVS commit: src/sys/fs/udf

2022-03-08 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Tue Mar  8 18:30:43 UTC 2022

Modified Files:
src/sys/fs/udf: udf_subr.c

Log Message:
For bug-compatibility with Windows, the last VAT sector must be a multiple of
16/32 from the start of the track.  To allow for scratches, write out at least
a 32 pieces.


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.167 src/sys/fs/udf/udf_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2022-03-08 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Tue Mar  8 10:52:43 UTC 2022

Modified Files:
src/sys/fs/udf: udf_strat_sequential.c

Log Message:
On switching from writing to reading explicitly synchronize the caches. It
isn't strictly needed but some devices in the wild will otherwise bluntly
ignore all reading commands resulting in a kernel and device lockup.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/fs/udf/udf_strat_sequential.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2022-03-08 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Tue Mar  8 10:52:43 UTC 2022

Modified Files:
src/sys/fs/udf: udf_strat_sequential.c

Log Message:
On switching from writing to reading explicitly synchronize the caches. It
isn't strictly needed but some devices in the wild will otherwise bluntly
ignore all reading commands resulting in a kernel and device lockup.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/fs/udf/udf_strat_sequential.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_strat_sequential.c
diff -u src/sys/fs/udf/udf_strat_sequential.c:1.15 src/sys/fs/udf/udf_strat_sequential.c:1.16
--- src/sys/fs/udf/udf_strat_sequential.c:1.15	Tue May 24 09:55:57 2016
+++ src/sys/fs/udf/udf_strat_sequential.c	Tue Mar  8 10:52:43 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_strat_sequential.c,v 1.15 2016/05/24 09:55:57 reinoud Exp $ */
+/* $NetBSD: udf_strat_sequential.c,v 1.16 2022/03/08 10:52:43 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_strat_sequential.c,v 1.15 2016/05/24 09:55:57 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_strat_sequential.c,v 1.16 2022/03/08 10:52:43 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -549,6 +549,8 @@ udf_doshedule(struct udf_mount *ump)
 	if (new_queue != priv->cur_queue) {
 		DPRINTF(SHEDULE, ("switching from %d to %d\n",
 			priv->cur_queue, new_queue));
+		if (new_queue == UDF_SHED_READING)
+			udf_mmc_synchronise_caches(ump);
 	}
 
 	priv->cur_queue = new_queue;



CVS commit: src/sys/fs/udf

2022-02-11 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Feb 11 16:33:18 UTC 2022

Modified Files:
src/sys/fs/udf: udf_osta.c

Log Message:
Translate 254/255 compID values used for deleted entries as per UDF spec. This
allows the printing of the names of deleted file entries.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/fs/udf/udf_osta.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_osta.c
diff -u src/sys/fs/udf/udf_osta.c:1.10 src/sys/fs/udf/udf_osta.c:1.11
--- src/sys/fs/udf/udf_osta.c:1.10	Mon Aug  5 17:02:54 2013
+++ src/sys/fs/udf/udf_osta.c	Fri Feb 11 16:33:18 2022
@@ -1,10 +1,10 @@
-/* $NetBSD: udf_osta.c,v 1.10 2013/08/05 17:02:54 joerg Exp $ */
+/* $NetBSD: udf_osta.c,v 1.11 2022/02/11 16:33:18 reinoud Exp $ */
 #if HAVE_NBTOOL_CONFIG_H
 #include "nbtool_config.h"
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: udf_osta.c,v 1.10 2013/08/05 17:02:54 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_osta.c,v 1.11 2022/02/11 16:33:18 reinoud Exp $");
 
 /*
  * Various routines from the OSTA 2.01 specs.  Copyrights are included with
@@ -54,6 +54,12 @@ udf_UncompressUnicode(
 	/* Use UDFCompressed to store current byte being read. */
 	compID = UDFCompressed[0];
 
+	/* Translate 254/255 compID values used for deleted entries */
+	if (compID == 254)
+		compID = 8;
+	if (compID == 255)
+		compID = 16;
+
 	/* First check for valid compID. */
 	if (compID != 8 && compID != 16) {
 		returnValue = -1;



CVS commit: src/sys/fs/udf

2022-02-11 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Feb 11 16:33:18 UTC 2022

Modified Files:
src/sys/fs/udf: udf_osta.c

Log Message:
Translate 254/255 compID values used for deleted entries as per UDF spec. This
allows the printing of the names of deleted file entries.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/fs/udf/udf_osta.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2022-02-03 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Thu Feb  3 09:46:26 UTC 2022

Modified Files:
src/sys/fs/udf: udf_allocation.c

Log Message:
Revere modification of initializer; it can lead to race conditions where two
allocation would pick the `empty' space causing a panic later on.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/fs/udf/udf_allocation.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_allocation.c
diff -u src/sys/fs/udf/udf_allocation.c:1.45 src/sys/fs/udf/udf_allocation.c:1.46
--- src/sys/fs/udf/udf_allocation.c:1.45	Fri Jan 28 20:00:52 2022
+++ src/sys/fs/udf/udf_allocation.c	Thu Feb  3 09:46:26 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_allocation.c,v 1.45 2022/01/28 20:00:52 reinoud Exp $ */
+/* $NetBSD: udf_allocation.c,v 1.46 2022/02/03 09:46:26 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_allocation.c,v 1.45 2022/01/28 20:00:52 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_allocation.c,v 1.46 2022/02/03 09:46:26 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -863,8 +863,8 @@ udf_search_free_vatloc(struct udf_mount 
 		ump->vat_entries++;
 	}
 
-	/* mark entry with initialiser just in case */
-	lb_map = udf_rw32(0x);
+	/* mark entry with non free-space initialiser just in case */
+	lb_map = udf_rw32(0xfffe);
 	udf_vat_write(ump->vat_node, (uint8_t *) &lb_map, 4,
 		ump->vat_offset + lb_num *4);
 	ump->vat_last_free_lb = lb_num;



CVS commit: src/sys/fs/udf

2022-02-03 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Thu Feb  3 09:46:26 UTC 2022

Modified Files:
src/sys/fs/udf: udf_allocation.c

Log Message:
Revere modification of initializer; it can lead to race conditions where two
allocation would pick the `empty' space causing a panic later on.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/fs/udf/udf_allocation.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2022-01-28 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Jan 28 20:00:52 UTC 2022

Modified Files:
src/sys/fs/udf: udf_allocation.c

Log Message:
On freeing a virtual address in the VAT, use the correct value; this might
confuse other implementations who can reject the VAT on this.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/fs/udf/udf_allocation.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_allocation.c
diff -u src/sys/fs/udf/udf_allocation.c:1.44 src/sys/fs/udf/udf_allocation.c:1.45
--- src/sys/fs/udf/udf_allocation.c:1.44	Fri Sep  3 21:55:00 2021
+++ src/sys/fs/udf/udf_allocation.c	Fri Jan 28 20:00:52 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_allocation.c,v 1.44 2021/09/03 21:55:00 andvar Exp $ */
+/* $NetBSD: udf_allocation.c,v 1.45 2022/01/28 20:00:52 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_allocation.c,v 1.44 2021/09/03 21:55:00 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_allocation.c,v 1.45 2022/01/28 20:00:52 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -864,7 +864,7 @@ udf_search_free_vatloc(struct udf_mount 
 	}
 
 	/* mark entry with initialiser just in case */
-	lb_map = udf_rw32(0xfffe);
+	lb_map = udf_rw32(0x);
 	udf_vat_write(ump->vat_node, (uint8_t *) &lb_map, 4,
 		ump->vat_offset + lb_num *4);
 	ump->vat_last_free_lb = lb_num;



CVS commit: src/sys/fs/udf

2022-01-28 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Jan 28 20:00:52 UTC 2022

Modified Files:
src/sys/fs/udf: udf_allocation.c

Log Message:
On freeing a virtual address in the VAT, use the correct value; this might
confuse other implementations who can reject the VAT on this.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/fs/udf/udf_allocation.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2022-01-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jan 15 10:55:53 UTC 2022

Modified Files:
src/sys/fs/udf: udf_strat_direct.c udf_strat_rmw.c

Log Message:
s/adressing/addressing/


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/fs/udf/udf_strat_direct.c
cvs rdiff -u -r1.29 -r1.30 src/sys/fs/udf/udf_strat_rmw.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2022-01-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jan 15 10:55:53 UTC 2022

Modified Files:
src/sys/fs/udf: udf_strat_direct.c udf_strat_rmw.c

Log Message:
s/adressing/addressing/


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/fs/udf/udf_strat_direct.c
cvs rdiff -u -r1.29 -r1.30 src/sys/fs/udf/udf_strat_rmw.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_strat_direct.c
diff -u src/sys/fs/udf/udf_strat_direct.c:1.14 src/sys/fs/udf/udf_strat_direct.c:1.15
--- src/sys/fs/udf/udf_strat_direct.c:1.14	Tue May 24 09:55:57 2016
+++ src/sys/fs/udf/udf_strat_direct.c	Sat Jan 15 10:55:53 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_strat_direct.c,v 1.14 2016/05/24 09:55:57 reinoud Exp $ */
+/* $NetBSD: udf_strat_direct.c,v 1.15 2022/01/15 10:55:53 msaitoh Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_strat_direct.c,v 1.14 2016/05/24 09:55:57 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_strat_direct.c,v 1.15 2022/01/15 10:55:53 msaitoh Exp $");
 #endif /* not lint */
 
 
@@ -347,7 +347,7 @@ udf_queue_buf_direct(struct udf_strat_ar
 	 * Translate new mappings in lmapping to pmappings and try to
 	 * conglomerate extents to reduce the number of writes.
 	 *
-	 * pmapping to contain lb_nums as used for disc adressing.
+	 * pmapping to contain lb_nums as used for disc addressing.
 	 */
 	pmapping = ump->la_pmapping;
 	sectors  = (buf->b_bcount + sector_size -1) / sector_size;

Index: src/sys/fs/udf/udf_strat_rmw.c
diff -u src/sys/fs/udf/udf_strat_rmw.c:1.29 src/sys/fs/udf/udf_strat_rmw.c:1.30
--- src/sys/fs/udf/udf_strat_rmw.c:1.29	Sat Aug 21 09:59:46 2021
+++ src/sys/fs/udf/udf_strat_rmw.c	Sat Jan 15 10:55:53 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_strat_rmw.c,v 1.29 2021/08/21 09:59:46 andvar Exp $ */
+/* $NetBSD: udf_strat_rmw.c,v 1.30 2022/01/15 10:55:53 msaitoh Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_strat_rmw.c,v 1.29 2021/08/21 09:59:46 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_strat_rmw.c,v 1.30 2022/01/15 10:55:53 msaitoh Exp $");
 #endif /* not lint */
 
 
@@ -956,7 +956,7 @@ udf_queuebuf_rmw(struct udf_strat_args *
 
 	/*
 	 * Translate new mappings in lmapping to pmappings.
-	 * pmapping to contain lb_nums as used for disc adressing.
+	 * pmapping to contain lb_nums as used for disc addressing.
 	 */
 	pmapping = ump->la_pmapping;
 	sectors  = (buf->b_bcount + sector_size -1) / sector_size;



CVS commit: src/sys/fs/udf

2021-12-16 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Thu Dec 16 22:24:11 UTC 2021

Modified Files:
src/sys/fs/udf: udf_subr.c

Log Message:
Fix typo: reader -> header


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/fs/udf/udf_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_subr.c
diff -u src/sys/fs/udf/udf_subr.c:1.161 src/sys/fs/udf/udf_subr.c:1.162
--- src/sys/fs/udf/udf_subr.c:1.161	Thu Dec 16 22:19:08 2021
+++ src/sys/fs/udf/udf_subr.c	Thu Dec 16 22:24:10 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.161 2021/12/16 22:19:08 reinoud Exp $ */
+/* $NetBSD: udf_subr.c,v 1.162 2021/12/16 22:24:10 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.161 2021/12/16 22:19:08 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.162 2021/12/16 22:24:10 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -614,7 +614,7 @@ udf_search_writing_tracks(struct udf_mou
 
 /*
  * Check if the blob starts with a good UDF tag. Tags are protected by a
- * checksum over the reader except one byte at position 4 that is the checksum
+ * checksum over the header except one byte at position 4 that is the checksum
  * itself.
  */
 



CVS commit: src/sys/fs/udf

2021-12-16 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Thu Dec 16 22:24:11 UTC 2021

Modified Files:
src/sys/fs/udf: udf_subr.c

Log Message:
Fix typo: reader -> header


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/fs/udf/udf_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2021-12-16 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Thu Dec 16 22:19:09 UTC 2021

Modified Files:
src/sys/fs/udf: udf_subr.c

Log Message:
Fix serious issue with recordable media formatted with Win10. When closing it
after modification the VAT was written out corrupted making the disc
unreadable anymore on remount. Thanks for ig@ for spotting it in the wild!


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/fs/udf/udf_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_subr.c
diff -u src/sys/fs/udf/udf_subr.c:1.160 src/sys/fs/udf/udf_subr.c:1.161
--- src/sys/fs/udf/udf_subr.c:1.160	Wed Dec 15 22:02:30 2021
+++ src/sys/fs/udf/udf_subr.c	Thu Dec 16 22:19:08 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.160 2021/12/15 22:02:30 reinoud Exp $ */
+/* $NetBSD: udf_subr.c,v 1.161 2021/12/16 22:19:08 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.160 2021/12/15 22:02:30 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.161 2021/12/16 22:19:08 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -2765,10 +2765,11 @@ udf_update_vat_descriptor(struct udf_mou
 	struct icb_tag *icbtag;
 	struct udf_oldvat_tail *oldvat_tl;
 	struct udf_vat *vat;
+	struct regid *regid;
 	uint64_t unique_id;
 	uint32_t lb_size;
 	uint8_t *raw_vat;
-	int filetype, error;
+	int vat_length, impl_use_len, filetype, error;
 
 	KASSERT(vat_node);
 	KASSERT(lvinfo);
@@ -2813,11 +2814,20 @@ udf_update_vat_descriptor(struct udf_mou
 			sizeof(struct udf_oldvat_tail), ump->vat_entries * 4);
 	} else {
 		/* compose the VAT2 header */
+		vat_length = sizeof(struct udf_vat);
 		vat = (struct udf_vat *) raw_vat;
-		memset(vat, 0, sizeof(struct udf_vat));
 
-		vat->header_len   = udf_rw16(152);	/* as per spec */
-		vat->impl_use_len = udf_rw16(0);
+		error = udf_vat_read(vat_node, raw_vat, vat_length, 0);
+		if (error)
+			goto errout;
+
+		impl_use_len = udf_rw16(vat->impl_use_len);
+		vat_length += impl_use_len;
+
+		error = udf_vat_read(vat_node, raw_vat, vat_length, 0);
+		if (error)
+			goto errout;
+
 		memmove(vat->logvol_id, ump->logical_vol->logvol_id, 128);
 		vat->prev_vat = udf_rw32(0x);
 		vat->num_files= lvinfo->num_files;
@@ -2826,9 +2836,20 @@ udf_update_vat_descriptor(struct udf_mou
 		vat->min_udf_writever = lvinfo->min_udf_writever;
 		vat->max_udf_writever = lvinfo->max_udf_writever;
 
-		error = udf_vat_write(vat_node, raw_vat,
-			sizeof(struct udf_vat), 0);
+		if (impl_use_len >= sizeof(struct regid)) {
+			/* insert our implementation identification */
+			memset(vat->data, 0, impl_use_len);
+			regid = (struct regid *) vat->data;
+			udf_set_regid(regid, IMPL_NAME);
+			udf_add_app_regid(ump, regid);
+		} else {
+			if (impl_use_len)
+memset(vat->data, 0, impl_use_len);
+			vat->impl_use_len = 0;
+		}
+		error = udf_vat_write(vat_node, raw_vat, vat_length, 0);
 	}
+errout:
 	free(raw_vat, M_TEMP);
 
 	return error;	/* success! */
@@ -2997,7 +3018,7 @@ udf_check_for_vat(struct udf_node *vat_n
 
 		/* definition */
 		vat = (struct udf_vat *) raw_vat;
-		vat_offset  = vat->header_len;
+		vat_offset  = udf_rw16(vat->header_len);
 		vat_entries = (vat_length - vat_offset)/4;
 
 		assert(lvinfo);



CVS commit: src/sys/fs/udf

2021-12-16 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Thu Dec 16 22:19:09 UTC 2021

Modified Files:
src/sys/fs/udf: udf_subr.c

Log Message:
Fix serious issue with recordable media formatted with Win10. When closing it
after modification the VAT was written out corrupted making the disc
unreadable anymore on remount. Thanks for ig@ for spotting it in the wild!


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/fs/udf/udf_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2021-12-16 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Thu Dec 16 21:39:53 UTC 2021

Modified Files:
src/sys/fs/udf: udf_vfsops.c

Log Message:
Make sysctl udf.verbose dependent on UDF_DEBUG instead of DEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/fs/udf/udf_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_vfsops.c
diff -u src/sys/fs/udf/udf_vfsops.c:1.82 src/sys/fs/udf/udf_vfsops.c:1.83
--- src/sys/fs/udf/udf_vfsops.c:1.82	Thu Sep 16 22:19:11 2021
+++ src/sys/fs/udf/udf_vfsops.c	Thu Dec 16 21:39:53 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_vfsops.c,v 1.82 2021/09/16 22:19:11 andvar Exp $ */
+/* $NetBSD: udf_vfsops.c,v 1.83 2021/12/16 21:39:53 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_vfsops.c,v 1.82 2021/09/16 22:19:11 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_vfsops.c,v 1.83 2021/12/16 21:39:53 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -182,7 +182,7 @@ SYSCTL_SETUP(udf_sysctl_setup, "udf sysc
 		   SYSCTL_DESCR("OSTA Universal File System"),
 		   NULL, 0, NULL, 0,
 		   CTL_VFS, 24, CTL_EOL);
-#ifdef DEBUG
+#ifdef UDF_DEBUG
 	sysctl_createv(clog, 0, NULL, &node,
 		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
 		   CTLTYPE_INT, "verbose",



CVS commit: src/sys/fs/udf

2021-12-16 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Thu Dec 16 21:39:53 UTC 2021

Modified Files:
src/sys/fs/udf: udf_vfsops.c

Log Message:
Make sysctl udf.verbose dependent on UDF_DEBUG instead of DEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/fs/udf/udf_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2021-12-15 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Wed Dec 15 22:02:30 UTC 2021

Modified Files:
src/sys/fs/udf: udf_subr.c

Log Message:
While searching the VAT on recordable media, search the last sector too!
This fixes Win10 formatted discs from being mounted incorrectly.


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/sys/fs/udf/udf_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_subr.c
diff -u src/sys/fs/udf/udf_subr.c:1.159 src/sys/fs/udf/udf_subr.c:1.160
--- src/sys/fs/udf/udf_subr.c:1.159	Sun Dec  5 04:21:31 2021
+++ src/sys/fs/udf/udf_subr.c	Wed Dec 15 22:02:30 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.159 2021/12/05 04:21:31 msaitoh Exp $ */
+/* $NetBSD: udf_subr.c,v 1.160 2021/12/15 22:02:30 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.159 2021/12/05 04:21:31 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.160 2021/12/15 22:02:30 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -3102,7 +3102,7 @@ udf_search_vat(struct udf_mount *ump, un
 			if (vat_node)
 vput(vat_node->vnode);
 			vat_loc++;	/* walk forward */
-		} while (vat_loc < late_vat_loc);
+		} while (vat_loc <= late_vat_loc);
 		if (accepted_vat_node)
 			break;
 



CVS commit: src/sys/fs/udf

2021-12-15 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Wed Dec 15 22:02:30 UTC 2021

Modified Files:
src/sys/fs/udf: udf_subr.c

Log Message:
While searching the VAT on recordable media, search the last sector too!
This fixes Win10 formatted discs from being mounted incorrectly.


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/sys/fs/udf/udf_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/fs/udf

2015-12-18 Thread bch
libudf build failure. Missing comma ?

-bch


[...]
SOURCE=2 -c -DGPROF -DPROF-pg
/usr/src/sys/rump/fs/lib/libudf/../../../../fs/udf/udf_subr.c -o
udf_subr.po
--- udf_subr.o ---
SOURCE=2 -c/usr/src/sys/rump/fs/lib/libudf/../../../../fs/udf/udf_subr.c
-o udf_subr.o
--- udf_subr.po ---
/usr/src/sys/rump/fs/lib/libudf/../../../../fs/udf/udf_subr.c: In
function 'udf_read_internal':
/usr/src/sys/rump/fs/lib/libudf/../../../../fs/udf/udf_subr.c:6466:46:
error: macro "memset" requires 3 arguments, but only 2 given
  memset(&blob[inflen] 0, sector_size - inflen);
  ^
/usr/src/sys/rump/fs/lib/libudf/../../../../fs/udf/udf_subr.c:6466:2:
error: statement with no effect [-Werror=unused-value]
  memset(&blob[inflen] 0, sector_size - inflen);
  ^
[..]

On 12/18/15, Christos Zoulas  wrote:
> Module Name:  src
> Committed By: christos
> Date: Sat Dec 19 01:18:00 UTC 2015
>
> Modified Files:
>   src/sys/fs/udf: udf_subr.c
>
> Log Message:
> PR/50571: David Binderman: src/sys/fs/udf/udf_subr.c:6465: obvious
> performance tidyup
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.132 -r1.133 src/sys/fs/udf/udf_subr.c
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
>
>


Re: CVS commit: src/sys/fs/udf

2014-11-10 Thread Maxime Villard
Le 10/11/2014 20:44, Jeff Rizzo a écrit :
> Module Name:  src
> Committed By: riz
> Date: Mon Nov 10 19:44:08 UTC 2014
> 
> Modified Files:
>   src/sys/fs/udf: udf_rename.c
> 
> Log Message:
> Revert previous, it is actually needed.  (builds are failing)
> 

Arf yes, UDF is not enabled on amd64, I thought it was.

Sorry

> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.11 -r1.12 src/sys/fs/udf/udf_rename.c
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 
> 



CVS commit: src/sys/fs/udf

2010-02-26 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Feb 26 09:57:39 UTC 2010

Modified Files:
src/sys/fs/udf: udf_allocation.c

Log Message:
Typo and style


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/fs/udf/udf_allocation.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_allocation.c
diff -u src/sys/fs/udf/udf_allocation.c:1.28 src/sys/fs/udf/udf_allocation.c:1.29
--- src/sys/fs/udf/udf_allocation.c:1.28	Thu Feb 25 16:15:57 2010
+++ src/sys/fs/udf/udf_allocation.c	Fri Feb 26 09:57:39 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_allocation.c,v 1.28 2010/02/25 16:15:57 reinoud Exp $ */
+/* $NetBSD: udf_allocation.c,v 1.29 2010/02/26 09:57:39 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_allocation.c,v 1.28 2010/02/25 16:15:57 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_allocation.c,v 1.29 2010/02/26 09:57:39 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -1499,7 +1499,7 @@
 	DPRINTF(RESERVE, ("\tfree space on metadata partition %"PRIu64" blks\n", meta_free_lbs));
 
 	/* give away some of the free meta space, in unit block sizes */
-	to_trunc = meta_free_lbs/4;			/* give out a quart */
+	to_trunc = meta_free_lbs/4;			/* give out a quarter */
 	to_trunc = MAX(to_trunc, num_lb);
 	to_trunc = unit * ((to_trunc + unit-1) / unit);	/* round up */
 
@@ -1534,7 +1534,6 @@
 	sbd->num_bytes = udf_rw32(sbd->num_bytes) - to_trunc/8;
 	bitmap->max_offset = udf_rw32(sbd->num_bits);
 
-
 	num_vpart = udf_rw32(lvid->num_part);
 	freepos = &lvid->tables[0] + meta_vpart_num;
 	sizepos = &lvid->tables[0] + num_vpart + meta_vpart_num;



CVS commit: src/sys/fs/udf

2010-02-26 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Feb 26 09:57:39 UTC 2010

Modified Files:
src/sys/fs/udf: udf_allocation.c

Log Message:
Typo and style


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/fs/udf/udf_allocation.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2010-02-25 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Thu Feb 25 16:15:58 UTC 2010

Modified Files:
src/sys/fs/udf: udf.h udf_allocation.c udf_subr.c udf_subr.h

Log Message:
First part of shrinking/growing metadata partition support:

- extending the metadata partition

Still to follow:
- sparsify metadata partition
- growing the metadata partition
- unsparsifying metadata partition


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/fs/udf/udf.h
cvs rdiff -u -r1.27 -r1.28 src/sys/fs/udf/udf_allocation.c
cvs rdiff -u -r1.103 -r1.104 src/sys/fs/udf/udf_subr.c
cvs rdiff -u -r1.17 -r1.18 src/sys/fs/udf/udf_subr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2010-02-24 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Wed Feb 24 19:20:13 UTC 2010

Modified Files:
src/sys/fs/udf: udf.h udf_subr.c

Log Message:
Rename metadata partition parameters to be less generic and add the flags.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/fs/udf/udf.h
cvs rdiff -u -r1.102 -r1.103 src/sys/fs/udf/udf_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2010-02-24 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Wed Feb 24 19:14:12 UTC 2010

Modified Files:
src/sys/fs/udf: udf.h udf_subr.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/fs/udf/udf.h
cvs rdiff -u -r1.101 -r1.102 src/sys/fs/udf/udf_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/fs/udf

2009-07-03 Thread Elad Efrat
Hey,

> [fixes of commit issues]

Sorry about these -- I usually run a build of i386/ALL but apparently
I forgot this time.

Thanks for quickly noticing and fixing the problems! :)

-e.


Re: CVS commit: src/sys/fs/udf

2009-05-20 Thread Izumi Tsutsui
> > Log Message:
> > Fix *serious* bug in bswapping definitions for big endian machines.
> 
> Why are you not using the explicit functions from sys/endian.h?

It's also better to define and use h2fsNN() and fs2hNN() macros
to indicate which value should be in which endian for future maintainers.

---
Izumi Tsutsui


Re: CVS commit: src/sys/fs/udf

2009-05-19 Thread Joerg Sonnenberger
On Mon, May 18, 2009 at 08:52:24PM +, Reinoud Zandijk wrote:
> Log Message:
> Fix *serious* bug in bswapping definitions for big endian machines.

Why are you not using the explicit functions from sys/endian.h?

Joerg