summaryrefslogtreecommitdiffstats
path: root/sys/fs/msdosfs
Commit message (Collapse)AuthorAgeFilesLines
* VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used inattilio2008-01-133-25/+23
| | | | | | | | | | | conjuction with 'thread' argument passing which is always curthread. Remove the unuseful extra-argument and pass explicitly curthread to lower layer functions, when necessary. KPI results broken by this change, which should affect several ports, so version bumping and manpage update will be further committed. Tested by: kris, pho, Diego Sardina <siarodx at gmail dot com>
* vn_lock() is currently only used with the 'curthread' passed as argument.attilio2008-01-103-5/+5
| | | | | | | | | | | | | | | | Remove this argument and pass curthread directly to underlying VOP_LOCK1() VFS method. This modify makes the code cleaner and in particular remove an annoying dependence helping next lockmgr() cleanup. KPI results, obviously, changed. Manpage and FreeBSD_version will be updated through further commits. As a side note, would be valuable to say that next commits will address a similar cleanup about VFS methods, in particular vop_lock1 and vop_unlock. Tested by: Diego Sardina <siarodx at gmail dot com>, Andrea Di Pasquale <whyx dot it at gmail dot com>
* o English lesson from bde@: "iff" is not a typo, it means "if and only if".maxim2007-11-181-1/+1
| | | | Backout previous.
* o Fix a typo in the comment.maxim2007-11-171-1/+1
|
* Remove some debugging code that, while useful, doesn't belong in the committedtrhodes2007-10-252-16/+6
| | | | | | version. While here, expand a macro only used once. Discussed with/oked by: bde
* Fixes to msdosfs dirtyflag related stuff:delphij2007-10-221-26/+42
| | | | | | | | | | | - markvoldirty() needs to write to underlying GEOM provider. We have to do that *before* g_access() which sets the GEOM provider to read-only. - Remove dirty flag before free'ing iconv related resources. The dirty flag removal could fail, and it is hard to revert the iconv-free after the fail. - Mark volume as dirty if we have failed to mark it clean for safe. - Other style fixes to the touched functions.
* Implement the async (really, delayed-write) mount option for msdosfs.bde2007-10-194-10/+18
| | | | | | | | | | | | | | | | | | This is much simpler than for ffs since there are many fewer places where we need to choose between a delayed write and a sync write -- just 5 in msdosfs and more than 30 in ffs. This is more complete and correct than in ffs. Several places in ffs are are still missing the choice. ffs_update() has a layering violation that breaks callers which want to force a sync update (mainly fsync(2) and O_SYNC write(2)). However, fsync(2) and O_SYNC write(2) are still more broken than in ffs, since they are broken for default (non-sync non-async) mounts too. Both fail to sync the FAT in all cases, and both fail to sync the directory entry in some cases after losing a race. Async everything is probably safer than the half-baked sync of metadata given by default mounts.
* Add noclusterr and noclusterw options to the options list. I forgot thesebde2007-10-181-1/+1
| | | | when I implemented clustering.
* Fix some style bugs in the mount options list. Mainly, sort the list,bde2007-10-181-6/+7
| | | | | | leaving space for adding missing options. Negative options are sorted after removing their "no" prefix, and generic options are sorted before msdosfs-specific ones.
* In msdosfs_settattr(), don't do synchronous updates of the denodebde2007-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | (except indirectly for the size pseudo-attribute). If anything deserves a sync update, then it is ids and immutable flags, since these are related to security, but ffs never synced these and msdosfs doesn't support them. (ufs_setattr() only does an update in one case where it is least needed (for timestamps); it did pessimal sync updates for timestamps until 1998/03/08 but was changed for unlogged reasons related to soft updates.) Now msdosfs calls deupdat() with waitfor == 0, which normally gives a delayed update to disk but always gives a sync update of timestamps in core, while for ffs everything is delayed until the syncer daemon or other activity causes an update (except for timestamps). This gives a large optimization mainly for things like cp -p, where attribute adjustment could easily triple the number of physical I/O's if it is done synchronously (but cp -p to msdosfs is not as bad as that, since msdosfs doesn't support many attributes so null adjustments are more common, and msdosfs doesn't support ctimes so even if cp doesn't weed out null adjustments they don't become non-null after clobbering the ctime).
* Get rid of qaddr_t.alfred2007-10-161-3/+3
| | | | Requested by: bde
* Remove some of the pessimizations involving writing the fsi sector.bde2007-09-231-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | All active fields in fsi are advisory/optional, so we shouldn't do extra work to make them valid at all times, but instead we write to the fsi too often (we still do), and we searched for a free cluster for fsinxtfree too often. This commit just removes the whole search and its results, so that we write out our in-core copy of fsinxtfree instead of writing a "fixed" copy and clobbering our in-core copy. This saves fixing 3 bugs: - off-by-1 error for the end of the search, resulting in fsinxtfree not actually being adjusted iff only the last cluster is free. - missing adjustment when no clusters are free. - off-by-many error for the start of the search. Starting the search at 0 instead of at (the in-core copy of) fsinxtfree did more than defeat the reasons for existence of fsinxtfree. fsinxtfree exists mainly to avoid having to start at 0 for just the first search per mount, but has the side effect of reducing bias towards allocating near cluster 0. The bias would normally only be generated by the first search per mount (if fsinxtfree is not supported), but since we also adjusted the in-core copy of fsinxtfree here, we were doing extra work to maximize the bias. Approved by: re (kensmith)
* Fix races in msdosfs_lookup() and msdosfs_readdir(). These functionsbde2007-08-314-62/+64
| | | | | | | | | | | | | | | | | | | | | | | can easily block in bread(), and then there was nothing to prevent the static buffer (nambuf_{ptr,len,last_id}) being clobbered by another thread. The effects of the bug seem to have been limited to failed lookups and mangled names in readdir(), since Giant locking provides enough serialization to prevent concurrent calls to the functions that access the buffer. They were very obvious for multiple concurrent tree walks, especially with a small cluster size. The bug was introduced in msdosfs_conv.c 1.34 and associated changes, and is in all releases starting with 5.2. The fix is to allocate the buffer as a local variable and pass around pointers to it like "_r" functions in libc do. Stack use from this is large but not too large. This also fixes a memory leak on module unload. Reviewed by: kib Approved by: re (kensmith)
* On 6.x this works:jhb2007-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | % mount | grep home /dev/ad4s1e on /home (ufs, local, noatime, soft-updates) % mount -u -o atime /home % mount | grep home /dev/ad4s1e on /home (ufs, local, soft-updates) Restore this behavior for on 7.x for the following mount options: noatime, noclusterr, noclusterw, noexec, nosuid, nosymfollow In addition, on 7.x, the following are equivalent: mount -u -o atime /home mount -u -o nonoatime /home Ideally, when we introduce new mount options, we should avoid options starting with "no". :) Requested by: jhb Reported by: Karol Kwiat <karol.kwiat gmail com>, Scott Hetzel <swhetzel gmail com> Approved by: re (bmah) Proxy commit for: rodrigc
* In msdosfs_read() and msdosfs_write(), don't check explicitly forbde2007-08-071-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (uio_offset < 0) since this can't happen. If this happens, then the general code handles the problem safely (better than before for reading, returning 0 (EOF) instead of the bogus errno EINVAL, and the same as before for writing, returning EFBIG). In msdosfs_read(), don't check for (uio_resid < 0). msdosfs_write() already didn't check. In msdosfs_read(), document in a comment our assumptions that the caller passed a valid uio_offset and uio_resid. ffs checks using KASSERT(), and that is enough sanity checking. In the same comment, partly document there is no need to check for the EOVERFLOW case, unlike in ffs where this case can happen at least in theory. In msdosfs_write(), add a comment about why the checking of (uio_resid == 0) is explicit, unlike in ffs. In msdosfs_write(), check for impossibly large final offsets before checking if the file size rlimit would be exceeded, so that we don't have an overflow bug in the rlimit check and are consistent with ffs. We now return EFBIG instead of EFBIG plus a SIGXFSZ signal if the final offset would be impossibly large but not so large as to cause overflow. Overflow normally gave the benign behaviour of no signal. Approved by: re (kensmith) (blanket)
* Fix and update the comments about the effect of the read-only flag on writing.bde2007-08-071-10/+16
| | | | | | | | They are still too verbose. Remove nearby unreachable code for handling symlinks. Approved by: re (kensmith) (blanket)
* Fix some style bugs (don't assume that off_t == int64_t; fix some comments;bde2007-08-071-11/+10
| | | | | | | | | | remove some parentheses; fix some whitespace errors; fix only one case of a boolean comparison of a non-boolean). Improve an error message by quoting ".", and by not printing large positive values as negative ones. Approved by: re (kensmith) (blanket)
* Fix some style bugs (don't assume that off_t == int64_t; fix some comments;bde2007-08-071-11/+9
| | | | | | remove some parentheses; fix only a couple of whtespace errors). Approved by: re (kensmith) (blanket)
* Fix some style bugs (mainly some whitespace errors).bde2007-08-071-22/+20
| | | | Approved by: re (kensmith) (blanket)
* Fix some style bugs (some whitespace errors only).bde2007-08-072-11/+11
| | | | Approved by: re (kensmith) (blanket)
* Sort includes.bde2007-08-071-10/+10
| | | | | | Remove rotted banal comment attached to includes. Approved by: re (kensmith) (blanket)
* Sort includes.bde2007-08-071-11/+11
| | | | | | Remove banal comments attached to includes. Approved by: re (kensmith) (blanket)
* Sort includes.bde2007-08-071-9/+3
| | | | | | | Remove banal comments before includes. Remove rotted banal comments attached to includes. Approved by: re (kensmith) (blanket)
* Remove unused include(s).bde2007-08-071-10/+4
| | | | | | Remove banal comments before includes. Approved by: re (kensmith) (blanket)
* Remove unused include(s).bde2007-08-074-11/+11
| | | | Approved by: re (kensmith) (blanket)
* Include <sys/mutex.h> and its prerequisite <sys/lock.h> instead ofbde2007-08-071-0/+2
| | | | | | depending on namespace pollution in <sys/buf.h> and/or <sys/vnode.h> Approved by: re (kensmith) (blanket)
* Include <sys/mutex.h>'s prerequisite <sys/lock.h> instead of depending onbde2007-08-071-1/+2
| | | | | | | | | namespace pollution in <sys/vnode.h>. Sort the include of <sys/mutex.h> instead of unsorting it after <sys/vnode.h> and depending on the pollution there. Approved by: re (kensmith) (blanket)
* Remove unused include(s).bde2007-08-077-15/+0
| | | | Approved by: re (kensmith) (blanket)
* Silently fix up the estimated next free cluster number from the fsinfobde2007-08-051-10/+12
| | | | | | | | | | | | | | | | | | | sector, instead of failing the whole mount if it is garbage. Fields in the fsinfo sector are only advisory, so there are better sanity checks than this, and we already silently fix up the only other advisory field in the fsinfo (the free cluster count). This wasn't handled quite right in rev.1.92, 1.117, or in NetBSD. 1.92 also failed the whole mount for the non-garbage magic value 0xffffffff 1.117 fixed this well enough in practice since garbage values shouldn't occur in practice, but left the error handling larger and more convoluted than necessary. Now we handle the magic value as a special case of fixing up all out of bounds values. Also fix up the estimated next free cluster number when there is no fsinfo sector. We were using 0, but CLUST_FIRST is safer. Approved by: re (kensmith)
* Oops, fix the fix for the i/o size of the fsinfo block. Its logbde2007-08-032-2/+2
| | | | | | | | | | | | | | | message explained why the size is 1 sector, but the code used a size of 1 cluster. I/o sizes larger than necessary may cause serious coherency problems in the buffer cache. Here I think there were only minor efficiency problems, since a too-large fsinfo buffer could only get far enough to overlap buffers for the same vnode (the device vnode), so mappings are coherent at the page level although not at the buffer level, and the former is probably enough due to our limited use of the fsinfo buffer. Approved by: re (kensmith)
* Make using msdosfs as the root file system sort of work:bde2007-07-231-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Initialize ownerships and permissions. They were garbage (0) for root mounts since vfs_mountroot_try() doesn't ask for them to be set and msdosfs's old incomplete code to set them was removed. The garbage happened to give the correct ownerships root:wheel, but it gave permissions 000 so init could not be execed. Use the macros for root: wheel and 0755. (The removed code gave 0:0 and 0777. 0755 is more normal and secure, thought wrong for /tmp.) o Check the readonly flag for initial (non-MNT_UPDATE) mounts in the correct place, as in ffs. For root mounts, it is only passed in mp->mnt_flags, since vfs_mountroot_try() only passes it as a flag and nothing translates the flag to the "ro" option string. msdosfs only looked for it in the string, so it gave a rw mount for root mounts without even clearing the flag in mp->mnt_flags, so the final state was inconsistent. Checking the flag only in mp->mnt_flags works for initial userland mounts too. The MNT_UPDATE case is messier. The main point that should work but doesn't is fsck of msdosfs root while it is mounted ro. This needs mainly MNT_RELOAD support to work. It should be possible to run fsck -p and succeed provided the fs is consistent, not just for msdosfs, but this fails because fsck -p always tries to open the device rw. The hack that allows open for writing in ffs is not implemented in msdosfs, since without MNT_RELOAD support writing could only be harmful. So fsck must be turned off to use msdosfs as root. This is quite dangerous, since msdosfs is still missing actually using its fs-dirty flag internally, so it is happy to mount dirty fileystems rw. Unrelated changes: - Fix missing error handling for MNT_UPDATE from rw to ro. - Catch up with renaming msdos to msdosfs in a string. Approved by: re (kensmith)
* Implement vfs clustering for msdosfs.bde2007-07-201-6/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | This gives a very large speedup for small block sizes (in my tests, about 5 times for write and 3 times for read with a block size of 512, if clustering is possible) and a moderate speedup for the moderatatly large block sizes that should be used on non-small media (4K is the best size in most cases, and the speedup for that is about 1.3 times for write and 1.2 times for read). mmap() should benefit from clustering like read()/write(), but the current implementation of vm only supports clustering (at least for getpages) if the fs block size is >= PAGE SIZE. msdosfs is now only slightly slower than ffs with soft updates for writing and slightly faster for reading when both use their best block sizes. Writing is slower for msdosfs because of more sync writes. Reading is faster for msdosfs because indirect blocks interfere with clustering in ffs. The changes in msdosfs_read() and msdosfs_write() are simpler merges of corresponding code in ffs (after fixing some style bugs in ffs). msdosfs_bmap() needs fs-specific code. This implementation loops calling a lower level bmap function to do the hard parts. This is a bit inefficient, but is efficient enough since msdsfs_bmap() is only called when there is physical i/o to do. Approved by: re (hrs)
* Clean up before implementing vfs clustering for msdosfs:bde2007-07-202-37/+43
| | | | | | | | | | | | | | | | | | | | | | In msdosfs_read(), mainly reorder the main loop to the same order as in ffs_read(). In msdosfs_write() and extendfile(), use vfs_bio_clrbuf() instead of clrbuf(). I think this just just a bogus optimization, but ffs always does it and msdosfs already did it in one place, and it is what I've tested. In msdosfs_write(), merge good bits from a comment in ffs_write(), and fix 1 style bug. In the main comment for msdosfs_pcbmap(), improve wording and catch up with 13 years of changes in the function. This comment belongs in VOP_BMAP.9 but that doesn't exist. In msdosfs_bmap(), return EFBIG if the requested cluster number is out of bounds instead of blindly truncating it, and fix many style bugs. Approved by: re (hrs)
* Round up the FAT block size to a multiple of the sector size so that i/obde2007-07-121-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | to the FAT is possible. Make the FAT block size less arbitrary before it is rounded up: - for FAT12, default to 3*512 instead of to 3 sectors. The magic 3 is the default number of 512-byte FAT sectors on a floppy drive. That many sectors is too many if the sector size is larger. - for !FAT12, default to PAGE_SIZE instead of to 4096. Remove MSDOSFS_DFLTBSIZE since it only obfuscated this 4096. For reading the BPB, use a block size of 8192 instead of 2048 so that sector sizes up to 8192 can work. We should try several sizes, or just try the maximum supported size (MAXBSIZE = 64K). I use 8192 because that is enough for DVD-RW's (even 2048 is enough) and 8192 has been tested a lot in use by ffs. This completes fixing msdosfs for some large sector sizes (up to 8K for read and 64K for write). Microsoft documents support for sector sizes up to 4K in mdosfs. ffs is currently limited to 8K for both read and write. Approved by: re (kensmith) Approved by: nyan (several years ago)
* Fix some bugs involving the fsinfo block (many remain unfixed). This isbde2007-07-124-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | part of fixing msdosfs for large sector sizes. One of the fixed bugs was fatal for large sector sizes. 1. The fsinfo block has size 512, but it was misunderstood and declared as having size 1024, with nothing in the second 512 bytes except a signature at the end. The second 512 bytes actually normally (if the file system was created by Windows) consist of a second boot sector which is normally (in WinXP) empty except for a signature -- the normal layout is one boot sector, one fsinfo sector, another boot sector, then these 3 sectors duplicated. However, other layouts are valid. newfs_msdos produces a valid layout with one boot sector, one fsinfo sector, then these 2 sectors duplicated. The signature check for the extra part of the fsinfo was thus normally checking the signature in either the second boot sector or the first boot sector in the copy, and thus accidentally succeeding. The extra signature check would just fail for weirder layouts with 512-byte sectors, and for normal layouts with any other sector size. Remove the extra bytes and the extra signature check. 2. Old versions did i/o to the fsinfo block using size 1024, with the second half only used for the extra signature check on read. This was harmless for sector size 512, and worked accidentally for sector size 1024. The i/o just failed for larger sector sizes. The version being fixed did i/o to the fsinfo block using size fsi_size(pmp) = (1024 << ((pmp)->pm_BlkPerSec >> 2)). This expression makes no sense. It happens to work for sector small sector sizes, but for sector size 32K it gives the preposterous value of 64M and thus causes panics. A sector size of 32768 is necessary for at least some DVD-RW's (where the minimum write size is 32768 although the minimum read size is 2048). Now that the size of the fsinfo block is 512, it always fits in one sector so there is no need for a macro to express it. Just use the sector size where the old code uses 1024. Approved by: re (kensmith) Approved by: nyan (several years ago for a different version of (2))
* Don't use almost perfectly pessimal cluster allocation. Allocationbde2007-07-102-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of the the first cluster in a file (and, if the allocation cannot be continued contiguously, for subsequent clusters in a file) was randomized in an attempt to leave space for contiguous allocation of subsequent clusters in each file when there are multiple writers. This reduced internal fragmentation by a few percent, but it increased external fragmentation by up to a few thousand percent. Use simple sequential allocation instead. Actually maintain the fsinfo sequence index for this. The read and write of this index from/to disk still have many non-critical bugs, but we now write an index that has something to do with our allocations instead of being modified garbage. If there is no fsinfo on the disk, then we maintain the index internally and don't go near the bugs for writing it. Allocating the first free cluster gives a layout that is almost as good (better in some cases), but takes too much CPU if the FAT is large and the first free cluster is not near the beginning. The effect of this change for untar and tar of a slightly reduced copy of /usr/src on a new file system was: Before (msdosfs 4K-clusters): untar: 459.57 real untar from cached file (actually a pipe) tar: 342.50 real tar from uncached tree to /dev/zero Before (ffs2 soft updates 4K-blocks 4K-frags) untar: 39.18 real tar: 29.94 real Before (ffs2 soft updates 16K-blocks 2K-frags) untar: 31.35 real tar: 18.30 real After (msdosfs 4K-clusters): untar 54.83 real tar 16.18 real All of these times can be improved further. With multiple concurrent writers or readers (especially readers), the improvement is smaller, but I couldn't find any case where it is negative. 342 seconds for tarring up about 342 MB on a ~47MB/S partition is just hard to unimprove on. (This operation would take about 7.3 seconds with reasonably localized allocation and perfect read-ahead.) However, for active file systems, 342 seconds is closer to normal than the 16+ seconds above or the 11 seconds with other changes (best I've measured -- won easily by msdosfs!). E.g., my active /usr/src on ffs1 is quite old and fragmented, so reading to prepare for the above benchmark takes about 6 times longer than reading back the fresh copies of it. Approved by: re (kensmith)
* Eliminate now-unused SUSER_ALLOWJAIL arguments to priv_check_cred(); inrwatson2007-06-121-8/+4
| | | | | | | | | | | | | | | some cases, move to priv_check() if it was an operation on a thread and no other flags were present. Eliminate caller-side jail exception checking (also now-unused); jail privilege exception code now goes solely in kern_jail.c. We can't yet eliminate suser() due to some cases in the KAME code where a privilege check is performed and then used in many different deferred paths. Do, however, move those prototypes to priv.h. Reviewed by: csjp Obtained from: TrustedBSD Project
* Revert previous, part of NFS that I didn't know about.trhodes2007-06-011-0/+20
|
* Garbage collect msdosfs_fhtovp; it appears unused and I have been usingtrhodes2007-06-011-20/+0
| | | | MSDOSFS without this function and problems for the last month.
* Make insmntque() externally visibile and allow it to fail (e.g. duringtegge2007-03-131-1/+10
| | | | | | | | | | | | | | | | | | | | | | | late stages of unmount). On failure, the vnode is recycled. Add insmntque1(), to allow for file system specific cleanup when recycling vnode on failure. Change getnewvnode() to no longer call insmntque(). Previously, embryonic vnodes were put onto the list of vnode belonging to a file system, which is unsafe for a file system marked MPSAFE. Change vfs_hash_insert() to no longer lock the vnode. The caller now has that responsibility. Change most file systems to lock the vnode and call insmntque() or insmntque1() after a new vnode has been sufficiently setup. Handle failed insmntque*() calls by propagating errors to callers, possibly after some file system specific cleanup. Approved by: re (kensmith) Reviewed by: kib In collaboration with: kib
* Move vnode-to-file-handle translation from vfs_vptofh to vop_vptofh method.pjd2007-02-152-17/+21
| | | | | | | | | | | | | | | | This way we may support multiple structures in v_data vnode field within one file system without using black magic. Vnode-to-file-handle should be VOP in the first place, but was made VFS operation to keep interface as compatible as possible with SUN's VFS. BTW. Now Solaris also implements vnode-to-file-handle as VOP operation. VFS_VPTOFH() was left for API backward compatibility, but is marked for removal before 8.0-RELEASE. Approved by: mckusick Discussed with: many (on IRC) Tested with: ufs, msdosfs, cd9660, nullfs and zfs
* Add noatime to the list of mount options that msdosfs accepts.rodrigc2007-02-081-1/+1
| | | | | PR: 108896 Submitted by: Eugene Grosbein <eugen grosbein pp ru>
* Style fixes: use ANSI C function declarations.rodrigc2007-02-081-31/+8
|
* Eliminate some dead code which was introduced in 1.23, yet was alwaysrodrigc2007-02-061-11/+0
| | | | commented out.
* Fixing compilation bustage by removing references to opt_msdosfs.h.avatar2007-01-302-4/+0
| | | | | This auto-generated header file no longer exists since the removal of MSDOSFS_LARGE in sys/conf/options:1.574.
* Fix spacing from my previous commit to this file:trhodes2007-01-301-1/+1
| | | | Noticed by: fjoe
* Add a "-o large" mount option for msdosfs. Convert compile-time checks forrodrigc2007-01-302-36/+54
| | | | | | | | | | | | | | | | #ifdef MSDOSFS_LARGE to run-time checks to see if "-o large" was specified. Test case provided by Oliver Fromme: truncate -s 200G test.img mdconfig -a -t vnode -f test.img -u 9 newfs_msdos -s 419430400 -n 1 /dev/md9 zip250 mount -t msdosfs /dev/md9 /mnt # should fail mount -t msdosfs -o large /dev/md9 /mnt # should succeed PR: 105964 Requested by: Oliver Fromme <olli lurza secnetix de> Tested by: trhodes MFC after: 2 weeks
* Add a 3rd entry in the cache, which keeps the end positiontrhodes2007-01-162-3/+19
| | | | | | | | | | from just before extending a file. This has the desired effect of keeping the write speed constant. And yes, that helps a lot copying large files always at full speed now, and I have seen improvements using benchmarks/bonnie. Stolen from: NetBSD Reviewed by: bde
* When performing a mount update to change a mount from read-only to read-write,rodrigc2007-01-061-4/+10
| | | | | | | | | | | | | | | | | | | | | do not call markvoldirty() until the mount has been flagged as read-write. Due to the nature of the msdosfs code, this bug only seemed to appear for FAT-16 and FAT-32. This fixes the testcase: #!/bin/sh dd if=/dev/zero bs=1m count=1 oseek=119 of=image.msdos mdconfig -a -t vnode -f image.msdos newfs_msdos -F 16 /dev/md0 fd120m mount_msdosfs -o ro /dev/md0 /mnt mount | grep md0 mount -u -o rw /dev/md0; echo $? mount | grep md0 umount /mnt mdconfig -d -u 0 PR: 105412 Tested by: Eugene Grosbein <eugen grosbein pp ru>
* Eliminate obsolete comment, now that getushort() is implemented inrodrigc2007-01-051-4/+0
| | | | terms of functions in <sys/endian.h>.
OpenPOWER on IntegriCloud