summaryrefslogtreecommitdiff
path: root/sys/dev/vnd.c
AgeCommit message (Collapse)Author
2008-08-14Allow the sector size to be specified by the user when configuring aJoel Sing
vnd(4) device, via a new -s option to vnconfig/mount_vnd. This allows us to create disklabels and file systems that are suitable for use on devices that have a non-512 byte sector size (eg. CDROMs). With help from krw@ and feedback from pedro@. ok krw@, pedro@
2008-07-23Correct cases of mishandling of pending reads and writes to preventBob Beck
them going negative - this consists of identifying a number of cases of IO not going through the buffer cache and marking those buffers with B_RAW - as well as fixing nfs_bio to show pending writes and reads through the buffer cache via NFS still has a problem with mishandling the counters I believe in the async/sync fallback case where counters stay positive which will be addressed seperately. ok tedu@ deraadt@
2008-07-20Add DIOCGPDINFO support. 'disklabel -d svnd0' now works.Kenneth R Westerback
2008-06-29Use DEV_BSIZE (defined as 512) instead of 512 when initializing theKenneth R Westerback
disklabel's d_secsize. ok millert@ marco@
2008-03-24Change XXgetdisklabel() to the 'normal' four parameter model toKenneth R Westerback
prepare for adding missing DIOC* ioctl's. No functional change.
2007-10-15more remove unneeded declarations that shadows existing vars; ok by many.Federico G. Schwindt
2007-09-29make safe vnds work on block devices.Felix Kronlage
from Piotr Durlej, tested by henning@, krw@, thib@ and myself ok thib@, grunk@, krw@
2007-09-12There is no such word as `detatch'.Michael Knudsen
ok mglocker
2007-09-11KNFGilles Chehade
prompted and "much better" by marco@, ok pyr@
2007-09-08more M_ZERO changesGilles Chehade
ok pyr@ and krw@
2007-06-20b_cylinder does not need to be set on the callpath down into drivers.Theo de Raadt
cpu_disklabel can go away, since nothing anymore needs to use it; ok miod
2007-06-08all drivers should spoof version 1 labelsTheo de Raadt
2007-06-06now that all partition size/offsets are potentially 64-bit, change theTheo de Raadt
type of all variables to daddr64_t. this includes the APIs for XXsize() and XXdump(), all range checks inside bio drivers, internal variables for disklabel handling, and even uvm's swap offsets. re-read numerous times by otto, miod, krw, thib to look for errors
2007-06-05use six new macros to access & store the 48-bit disklabel fields relatedTheo de Raadt
to size. tested on almost all machines, double checked by miod and krw next comes the type handling surrounding these values
2007-06-01Don't initialize d_partitions[RAW_DISK] just before callingKenneth R Westerback
readdisklabel(), since all readdisklabel()'s do that already. ok deraadt@
2007-05-12Use VNDLABELDEV() and not DISKLABELDEV() in writedisklabel() sinceKenneth R Westerback
VNDLABELDEV() is used in readdisklabel(). VNDLABELDEV() preserves the vndsimple() property encoded in the device.
2007-04-29Replace expansions of DISKLABELDEV() with DISKLABELDEV(). Shorter, andKenneth R Westerback
more consistant. No change to code. ok miod@
2007-03-25include rwlock.h ourselves, better than depending on it getting pickedTed Unangst
up elsewhere
2007-03-25use a rwlock instead of the homegrown approachTed Unangst
ok art pedro thib
2007-02-26Don't enforce RLIMIT_FSIZE on vnd(4) I/O operations, okay deraadt@Pedro Martelletto
2007-02-21Don't use arbitrary 128 bytes as size of the blf key array if we know exactlyAlexander von Gernler
how much blowfish takes at max, which is 72 bytes. Also define a constant for this in the include file, suggested by ray@. ok pedro@ thib@ tedu@
2007-02-01Don't throttle and serialize I/O operations, okay miod@ krw@Pedro Martelletto
Fixes kern/5347
2007-01-13Touch of clean up:Thordur I. Bjornsson
s/DEBUG/VNDDEBUG/ and introduce DNPRINTF, fold all the #ifdef DEBUG <stuff> #endif into DNPRINTFs. Use DTYPE_VND for the disklabel d_type member, dont calcluate d_secpercyl from d_ntrack * d_nsectors, just set it too 100 directly since we set d_ntrack and d_nsectors to 1 and 100 respectivly. testing and OK krw@
2006-12-24ansify, no binary change, from Bret LambertPedro Martelletto
2006-10-05Always allow read-only opens on (s)vnd devices, despite theThordur I. Bjornsson
type of the first open (svnd vs vnd). ok pedro@
2006-10-03Introduce daddr64_t and use it for physical block numbersPedro Martelletto
Okay weingart@, "I'm game with putting my name on it" dlg@
2006-09-20Make vnd(4) work on read-only file systems, from Paul Stoeber, okay tedu@Pedro Martelletto
2006-08-13fix a panic when trying to fdisk vnd devices (not svnd) wichThordur I. Bjornsson
are back by weird images (such as the ones qemu creates). proplem found the hard way by msf@ ok mickey@, pedro@
2006-08-12Setting d_secsize to DEV_BSIZE (or 1 << DEV_BSHIFT, or 512) and thenKenneth R Westerback
setting RAW_PART's p_size to d_secperunit * (d_secsize / DEV_BSIZE) is a waste of a few ops. And p_size should be in sectors anyway. Just set RAW_PART's p_size to d_secperunit to make usage consistant across the tree. Should be a no-op.
2006-03-15Nuke dk_establish(), no longer used.Miod Vallat
2006-03-04Disk interrupts can cause buffers to be returned to the vnd pool, soPedro Martelletto
splbio() is required when allocating. Fixes PR kern/5041, okay tedu@.
2006-01-22b_cylin -> b_cylinder; no functional change.Miod Vallat
2005-12-29Correctly bounds check transfers passed to vndstrategy()Pedro Martelletto
2005-07-20change sc_keyctx from void * to blf_ctx *. there's no point for it to beTed Unangst
void and means we can't correctly use sizeof() on the target. error report from frank denis in pr4290.
2005-04-19use pool for struct vndbug; tested by many and pedro@ okMichael Shalayeff
2005-04-12simplify vndopen() a bit.Joris Vink
ok pedro@
2005-01-05copyoutstr doesn't work so well with the kernel addressesTed Unangst
2004-06-30since we're not using 'len' for anything, nuke it and pass null toPedro Martelletto
copyin/copyout. suggested by millert@, ok'd by him and deraadt@
2004-06-30don't strlcpy() to user-space, use copyoutstr() instead. ok deraadt@Pedro Martelletto
2004-06-28You *cannot* strlcpy from userland. Pedro, go read this and find out whatTheo de Raadt
you did wrong. Bit in other changes that were backed out.
2004-06-27back out crud that breaks the macppcTheo de Raadt
2004-06-20add the VNDIOCGET ioctl to vnode disks, ok millert@Pedro Martelletto
2004-06-19save curproc for further reference, otherwise we may end up in lockmgr()Pedro Martelletto
with no process context. ok miod@. closes pr 3214.
2004-05-22Do not truncate intermediate results computing aiov.iov_len in vndsetcred();Otto Moerbeek
print size_t as unsigned long long. ok tedu@ miod@
2004-03-043 buglets.Ted Unangst
if keylen < 0, bad things happen. large keys are useless, limit size and use stack for temp storage bzero of keyctx is unrelated to keylen, wipe whole thing. ok markus tdeval
2004-03-03Make sure than svnd read their disklabel as svnd, not vnd devices.Miod Vallat
ok tedu@
2004-02-15knfTed Unangst
2004-02-15new arg to disk_unbusy, to record separate read/write statistics.Ted Unangst
looked at by various, testing henning@ mcbride@ dan weeks mostly from netbsd via Pedro Martelletto <pbastos@rdc.puc-rio.br>
2003-10-17vndunit() wasn't quite right after last change, limiting vnds to 16.Ted Unangst
apply fix from tom cosgrove to get the full range.
2003-10-11bump minor gap for svnd devices, so more vnds are allowed.Ted Unangst
this change REQUIRES running MAKEDEV again after booting with a new kernel. with a hint from tom cosgrove. ok deraadt@ millert@