CVS commit: src/sys/dev/dkwedge

2021-08-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Aug  4 21:44:42 UTC 2021

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Swap and Dump uses DEV_BSIZE units. Translate from device sectors like
regular I/O (strategy).


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2021-06-02 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Jun  2 17:56:41 UTC 2021

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Clear sc_mode only on last close.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2021-06-02 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Jun  2 15:59:08 UTC 2021

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Copy mode of open wedges with the same parent and validate it.
Remove race on mode value when closing.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2021-05-22 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat May 22 13:43:50 UTC 2021

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Handle read-only parent devices.

Currently this only affects xbd(4). Other disk drivers succeed opening
read-only disks as read-write and only fail subsequent write requests.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2020-10-06 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Oct  6 15:05:54 UTC 2020

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Check dkdriver before calling a driver function.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2020-05-24 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun May 24 14:40:21 UTC 2020

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
dkwedge_add: Allow for expanding the size of an existing wedge without
having to delete it first, provided that no other parameters have changed.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2020-05-02 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun May  3 06:30:45 UTC 2020

Modified Files:
src/sys/dev/dkwedge: dkwedge_rdb.c

Log Message:
Fix fallout of migration from malloc to geteblk.

- Use bp->b_data instead of bp itself.
- When buffer is not large enough, start all over; brelse + geteblk does not
  apparently behave like realloc.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/dkwedge/dkwedge_rdb.c

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



CVS commit: src/sys/dev/dkwedge

2020-04-11 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Apr 11 16:00:34 UTC 2020

Modified Files:
src/sys/dev/dkwedge: dkwedge_apple.c dkwedge_bsdlabel.c dkwedge_gpt.c
dkwedge_mbr.c dkwedge_rdb.c

Log Message:
allocate buffer for disk I/O via geteblk() instead of malloc(), so they
are properly aligned; e.g. readdisklabel() does the same

also removed the DKW_MALLOC()/DKW_FREE()/DKW_REALLOC() macros as apparently
unnecessary, these files don't seem to be compiled into any userland tools

dkwedge_gpt.c confirmed working, others compile-tested only


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/dkwedge/dkwedge_apple.c \
src/sys/dev/dkwedge/dkwedge_rdb.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/dkwedge/dkwedge_bsdlabel.c
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/dkwedge/dkwedge_gpt.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/dkwedge/dkwedge_mbr.c

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



CVS commit: src/sys/dev/dkwedge

2020-02-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar  1 03:19:46 UTC 2020

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Allow dumping to cgd(4) on a dk(4).

(Technically this also allows dumping to a dk(4) on which there
happens to be a cgd(4) configured, but I'm not sure how to
distinguish that case here.  So don't do that!)


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2020-02-27 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Fri Feb 28 06:01:23 UTC 2020

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Update sc->sc_parent->dk_rawvp while the lock named dk_rawlock held
to prevent a race condition

Fixes PR kern/55026

OKed by mlelstv@, thanks


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2019-04-10 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Apr 10 15:19:15 UTC 2019

Modified Files:
src/sys/dev/dkwedge: dkwedge_gpt.c

Log Message:
add types for windows and linux partitions.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/dkwedge/dkwedge_gpt.c

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



CVS commit: src/sys/dev/dkwedge

2017-09-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep  7 10:18:26 UTC 2017

Modified Files:
src/sys/dev/dkwedge: dkwedge_gpt.c

Log Message:
use arraycount.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/dkwedge/dkwedge_gpt.c

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



CVS commit: src/sys/dev/dkwedge

2017-09-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Sep  6 18:21:17 UTC 2017

Modified Files:
src/sys/dev/dkwedge: dkwedge_gpt.c

Log Message:
PR/52522: ent_name is not necessarily 0 terminated, so check bounds.
XXX: pullup-8


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/dkwedge/dkwedge_gpt.c

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



CVS commit: src/sys/dev/dkwedge

2017-02-27 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Feb 28 04:47:41 UTC 2017

Modified Files:
src/sys/dev/dkwedge: dkwedge_rdb.c

Log Message:
remove unnecessary substitution. no functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/dkwedge/dkwedge_rdb.c

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



CVS commit: src/sys/dev/dkwedge

2017-02-27 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Feb 28 04:46:02 UTC 2017

Modified Files:
src/sys/dev/dkwedge: dkwedge_rdb.c

Log Message:
determine the buffer size by roundup(9)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/dkwedge/dkwedge_rdb.c

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



CVS commit: src/sys/dev/dkwedge

2017-02-27 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Feb 28 04:39:58 UTC 2017

Modified Files:
src/sys/dev/dkwedge: dkwedge_rdb.c

Log Message:
Remove PARANOID macro; we should always update secsize if necessary.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/dkwedge/dkwedge_rdb.c

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



CVS commit: src/sys/dev/dkwedge

2017-02-27 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Feb 27 21:27:07 UTC 2017

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
pass also DIOCGCACHE to underlying device, so that upper layers would be able
to get the device cache properties without knowing the topology; while here also
pass down DIOCGSTRATEGY for neater dkctl(8) output


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2017-01-18 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Jan 19 00:44:40 UTC 2017

Modified Files:
src/sys/dev/dkwedge: dk.c dkwedge_apple.c dkwedge_gpt.c dkwedge_mbr.c

Log Message:
use a bounded copy. NFCI


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/dkwedge/dk.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/dkwedge/dkwedge_apple.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/dkwedge/dkwedge_gpt.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/dkwedge/dkwedge_mbr.c

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



CVS commit: src/sys/dev/dkwedge

2016-12-24 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Dec 24 16:39:55 UTC 2016

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
add missing mutex/cv cleanup to error paths.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2016-12-16 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Dec 16 15:06:39 UTC 2016

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Make dk(4) device mpsafe.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2016-05-29 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun May 29 13:11:21 UTC 2016

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
missed one exit path with the previous change.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2016-05-29 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun May 29 12:48:40 UTC 2016

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
release openlock mutex before closing parent device.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2016-04-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 28 00:35:24 UTC 2016

Modified Files:
src/sys/dev/dkwedge: dkwedge_gpt.c

Log Message:
Fix tyop


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/dkwedge/dkwedge_gpt.c

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



CVS commit: src/sys/dev/dkwedge

2016-04-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 28 00:33:54 UTC 2016

Modified Files:
src/sys/dev/dkwedge: dkwedge_gpt.c

Log Message:
Fix error message.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/dkwedge/dkwedge_gpt.c

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



CVS commit: src/sys/dev/dkwedge

2016-01-14 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Jan 15 07:48:22 UTC 2016

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Allow dump to raidframe component which is a wedge.

N.B. ordinary devices check the partition type only in the xxxsize routine.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2015-12-26 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Dec 27 00:47:47 UTC 2015

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Return error in dkopen when dk_open_parent fails. Also change dk_open_parent
to pass error code to caller.
XXX: Pullups


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2015-12-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec  2 01:09:49 UTC 2015

Modified Files:
src/sys/dev/dkwedge: dkwedge_mbr.c

Log Message:
Skip protective MBR early too.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/dkwedge/dkwedge_mbr.c

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



CVS commit: src/sys/dev/dkwedge

2015-11-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Nov 28 13:41:31 UTC 2015

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
sc_size is already measured in sectors.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2015-10-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 10 23:39:43 UTC 2015

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
remove incorrect comment (from kre)


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2015-10-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Oct  6 11:22:40 UTC 2015

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
print wedge announcement in one line instead of two


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2015-08-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Aug 25 11:08:59 UTC 2015

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Rename variable to avoid -Wshadow warnings with some compilers.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2015-08-23 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Aug 23 18:40:15 UTC 2015

Modified Files:
src/sys/dev/dkwedge: dkwedge_gpt.c

Log Message:
Quadruple GPT partition entry count limit (to 512 entries or 64KiB).

The UEFI 2.3.1 specification states that:
"A minimum of 16,384 bytes of space must be reserved for the GPT Partition 
Entry Array."
and [the size of a partition entry shall be a power of two greater than 128]
and that [the defined fields of a partition entry total 128 bytes].

Clamping the entries means that no partitions on the drive will be detected,
as this will result in an incorrect partition entry array CRC. This change
reduces the likelyhood of useless partitions, while still not allowing a
huge kernel memory allocation to load the partition entries into.

In the future this code should probably be reworked to checksum and evaluate
the partition array in chunks while still limiting the number of GPT
wedges added per drive to something reasonable.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/dkwedge/dkwedge_gpt.c

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



CVS commit: src/sys/dev/dkwedge

2015-08-22 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Aug 22 07:48:14 UTC 2015

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
No longer access the disk driver directly.
If there is an open wedge, temporarily reference its vnode.
Otherwise try to open the block device.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2015-08-22 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Aug 22 07:42:46 UTC 2015

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
revert the previous


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2015-08-20 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Aug 20 23:08:33 UTC 2015

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
when scanning for disklabels, close block device only when this was
the first open. The device driver doesn't do reference counting.

This is still subject to race conditions.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/dkwedge/dk.c

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




CVS commit: src/sys/dev/dkwedge

2015-01-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 24 02:58:57 UTC 2015

Modified Files:
src/sys/dev/dkwedge: dkwedge_apple.c

Log Message:
Look at the bzb flags to mark partition as swap. Requested by John D. Baker.
XXX: Pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/dkwedge/dkwedge_apple.c

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



CVS commit: src/sys/dev/dkwedge

2014-12-08 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec  8 17:45:12 UTC 2014

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Really provide disk properties, the old code computed values that were
never attached to the device.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2014-11-22 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Nov 22 11:59:33 UTC 2014

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
fix iobuf setup, cleanup


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2014-11-03 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Nov  4 07:50:39 UTC 2014

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Implement DIOCMWEDGES ioctl that triggers wedge autodiscovery.
Also fix a reference counting bug and clean up some code.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2014-11-03 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Nov  4 07:45:45 UTC 2014

Modified Files:
src/sys/dev/dkwedge: dkwedge_bsdlabel.c

Log Message:
Handle disks with non DEV_BSIZE sectors.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/dkwedge/dkwedge_bsdlabel.c

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



CVS commit: src/sys/dev/dkwedge

2014-11-03 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Nov  4 07:46:26 UTC 2014

Modified Files:
src/sys/dev/dkwedge: dkwedge_mbr.c

Log Message:
get sector size from disk structure.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/dkwedge/dkwedge_mbr.c

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



CVS commit: src/sys/dev/dkwedge

2014-11-03 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Nov  4 07:43:00 UTC 2014

Modified Files:
src/sys/dev/dkwedge: dkwedge_gpt.c

Log Message:
Be less noisy when handling wedge name conflicts.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/dkwedge/dkwedge_gpt.c

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



CVS commit: src/sys/dev/dkwedge

2014-08-30 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Aug 30 09:35:10 UTC 2014

Modified Files:
src/sys/dev/dkwedge: dkwedge_bsdlabel.c

Log Message:
When converting a disklabel partition type integer to a wedge partition
type string, use the strings defined in DKW_PTYPE_* in , not
the strings defined in FSTYPE_DEFN in .

This corrects a problem introduced in revision 1.21 dated 2014-08-18.
That change was intended to add additional case to the list, but it
accidentally also changed from the strings in the DKW_PTYPE_* macros to
the strings in the FSTYPE_DEFN macro.  Many of the strings are the same,
but there are differences such as "RAID" versus "raidframe" and "MSDOS"
versus "FAT".

XXX: There seems to be no good reason for the differences in string
names for partition types.  One or both of the lists should probably be
edited to align them.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/dkwedge/dkwedge_bsdlabel.c

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



CVS commit: src/sys/dev/dkwedge

2014-08-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Aug 28 19:37:46 UTC 2014

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Make dk(4) discard from partition start, not from disk start.

Otherwise, anything mounted with `-o discard' will pretty quickly
munch itself up and barf up an unrecoverably corrupted file system!

XXX pullup to netbsd-7


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2014-08-18 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Aug 18 14:18:59 UTC 2014

Modified Files:
src/sys/dev/dkwedge: dkwedge_bsdlabel.c

Log Message:
Use FSTYPE_DEFN from  to generate case branches for
conversions from all known disklabel fstypes to strings.  This replaces
the hand-coded list of conversions for only a few of the known types.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/dkwedge/dkwedge_bsdlabel.c

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



CVS commit: src/sys/dev/dkwedge

2014-08-18 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Aug 18 13:46:07 UTC 2014

Modified Files:
src/sys/dev/dkwedge: dkwedge_bsdlabel.c

Log Message:
Don't ignore unrecognised partition types in BSD disklabels;
instead, add them with wedge partition type "unknown#%u", where
%u is the underlying numeric partition type from the BSD disklabel.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/dkwedge/dkwedge_bsdlabel.c

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



CVS commit: src/sys/dev/dkwedge

2014-07-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Jul 25 08:23:57 UTC 2014

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Implement d_discard for dk. This closes PR 47940.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2013-08-03 Thread Soren S. Jorvang
Module Name:src
Committed By:   soren
Date:   Sat Aug  3 18:30:57 UTC 2013

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Don't complain about not being able to open empty removable media drives.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2012-06-07 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Jun  7 16:15:32 UTC 2012

Modified Files:
src/sys/dev/dkwedge: dkwedge_bsdlabel.c

Log Message:
Use the label's packname to create wedge names instead of the classic
device names. Fall back to classic device names when the label has an
empty name or the default name 'fictitious'.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/dkwedge/dkwedge_bsdlabel.c

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



CVS commit: src/sys/dev/dkwedge

2012-04-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr  7 05:36:10 UTC 2012

Added Files:
src/sys/dev/dkwedge: dkwedge_apple.c

Log Message:
recognize apple disks.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/dev/dkwedge/dkwedge_apple.c

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



CVS commit: src/sys/dev/dkwedge

2012-04-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr  7 05:09:09 UTC 2012

Modified Files:
src/sys/dev/dkwedge: dkwedge_mbr.c

Log Message:
use the partition sector size.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/dkwedge/dkwedge_mbr.c

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



CVS commit: src/sys/dev/dkwedge

2011-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar  3 03:39:08 UTC 2011

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
check rawvp before doing ioctl or strategy.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2011-02-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb 28 18:28:20 UTC 2011

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Make error checking consistent, possibly fixes PR/44652.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2010-12-23 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Dec 23 14:22:03 UTC 2010

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Make wedges aware of underlying physical block size.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2010-08-04 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Aug  4 12:34:00 UTC 2010

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Make sure to release sc_parent->dk_rawlock before calling
vn_close(sc->sc_parent->dk_rawvp). Avoids a lockdebug panic:
error: mutex_destroy: assertion failed: !MUTEX_OWNED(mtx->mtx_owner) && 
!MUTEX_HAS_WAITERS(mtx)
when the parent is a raidframe device.
See also:
http://mail-index.netbsd.org/tech-kern/2010/07/27/msg008612.html


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/dev/dkwedge

2010-05-17 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon May 17 23:09:52 UTC 2010

Modified Files:
src/sys/dev/dkwedge: dkwedge_gpt.c

Log Message:
Use wput_utf8() to improve conversion of UTF-16 GPT partition names to UTF-8.
Drop static CRC32 function in favor of the one from libkern.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/dkwedge/dkwedge_gpt.c

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