Commit Graph

945 Commits

Author SHA1 Message Date
reinoud b887c39003 Remove the need for the kernel option UDF_READWRITE to be able to write to
discs since writing is mature enough.
2008-08-08 18:25:56 +00:00
reinoud c3d5fdb471 Don't panic on read-errors but set flag that the packet is doomed. Its not
clear if i could read the individual sectors correctly since the entire
read packet is also one big ECC block.
2008-08-07 15:54:12 +00:00
reinoud a287d23dee Rewrite allocation scheme's determination and implementation replacing the
old somewhat naive selection scheme that didn't allow different allocation
settings for nodes, directory information (FIDs) and data.

Also fix some curious side-effects of atime updates on RMW devices.
2008-08-06 13:41:12 +00:00
reinoud 5e89a5a8f1 Fixup important bug in internal recorded data fixup. Although most unlikely
it could result in theory result in descriptor trashing.

On the performance side, it would try to fixup *every* descriptor even if
it wasn't an internally allocated one. Performance loss wasn't that big but
every bit helps.
2008-08-05 19:29:54 +00:00
reinoud 17cb09d3ee Remove comments on `need to read in'; they are read in. 2008-07-29 10:08:16 +00:00
pooka f00b7c9b12 Solve the fstat-wants-to-look-at-kernel-data-structures in a nicer
way: don't export the fs internals to innocent userspace programs
which just want to mount the file system.
2008-07-29 09:10:09 +00:00
reinoud 71c9aa3395 Streamline allocation to prepare it for metadata partition. Also add
preliminary Metadata partition write support but its disabled still since
its not finished yet and not functioning correctly. All other formats are
checked and should work fine.
2008-07-28 19:41:13 +00:00
pooka 966308f7e8 shuffle around some more defs for fstat
noticed by Kurt Schreiner on current-users
2008-07-28 18:00:20 +00:00
pooka 97f4be43e9 Install mount argument structure header just like every other file system. 2008-07-28 12:42:12 +00:00
reinoud 7ac1927ba2 Delay physical partition spacebitmaps from volume-descriptor-checking until
the other supporting structures are read in.
2008-07-27 11:38:23 +00:00
reinoud 5c3627bcdf Unify naming scheme and source code beautify for better readablility. 2008-07-27 11:21:21 +00:00
reinoud 4e0493c8f8 Forgot to rename those two references to write_space_bitmap too. 2008-07-26 20:52:04 +00:00
reinoud 8f7887a864 Clarify the current spacemap read/write code is reading/writing physical
partition space maps. This in preperation of Metadata spacetable
reading/writeout work.
2008-07-26 20:49:33 +00:00
reinoud 3653a53255 Clarify not implemented allocation schemes; mostly UDF 2.50
HD-DVD/BluRay-RE and UDF 2.60 for BluRay-R
2008-07-26 20:33:36 +00:00
reinoud 0dca08adcb Add metadata bitmap ICB file type 2008-07-25 15:37:56 +00:00
reinoud 5b49df17d8 No use walking empty hashtables when purging. 2008-07-22 21:39:08 +00:00
reinoud ff7ad972a5 Limit the UDF dirhash to a configurable amount of memory. The performance
penalty even with a limited dirhash of 128kb is acceptable but it should be
set by machine memory size though.
2008-07-22 19:06:55 +00:00
reinoud 3efc85e77e Limit sectorsize to max. 4096 bytes. This prevents a panic when declaring
the node pool since standard pools are limited upto 4096 aparently.
Pagesize limit even?
2008-07-19 16:36:40 +00:00
reinoud aa9f26d0bd Use the allocation descriptor types selected on mount when growing from an
internal to an extent recording.
2008-07-19 16:23:09 +00:00
reinoud a2718fb081 Use ecma-167 constants instead of homegrown to prevent double mapping. 2008-07-19 16:14:09 +00:00
reinoud a1f7916969 Choose which time of allocation descriptors to use on new nodes based on
the number of partition mappings.
2008-07-19 16:00:35 +00:00
reinoud a48555c3a3 Hopefully fix gcc type puned warning. 2008-07-18 16:21:12 +00:00
reinoud e7c5eefcfb fix comment 2008-07-18 15:55:32 +00:00
reinoud 5f233d9346 On dirhash lookup, don't retrieve info you already have. 2008-07-18 14:18:51 +00:00
reinoud f0040136a6 Remove double check 2008-07-18 13:39:41 +00:00
reinoud 43188548d8 First retrieve length and hash values *before* advancing to the next entry.
On hashline collision it would check a random one next.
2008-07-18 13:34:05 +00:00
reinoud aa9cb3deaa Instead of bombing out when trying to mount a disc RW when UDF_READWRITE is
not defined, downgrade it to a read-only mount.
2008-07-18 12:45:08 +00:00
reinoud 2ac28d554b Implement directory hashing to speed up directory traversals. Speed
improvements of at least 4 times in untarring and roughly 100 to 500 times
on file creation in big directories. Lookup of files was O(n*n) and is now
O(1) even for file creation. Free spaces in the directory are kept in a
seperate list for fast file creation.

The postmark benchmark gives:

UDF old:
pm>set transactions 2000
pm>set number 3000
pm>run
Creating files...Done
Performing transactions..........Done
Deleting files...Done
Time:
        1593 seconds total
        681 seconds of transactions (2 per second)

Files:
        3956 created (2 per second)
                Creation alone: 3000 files (4 per second)
                Mixed with transactions: 956 files (1 per second)
        990 read (1 per second)
        1010 appended (1 per second)
        3956 deleted (2 per second)
                Deletion alone: 2912 files (9 per second)
                Mixed with transactions: 1044 files (1 per second)

Data:
        5.26 megabytes read (3.38 kilobytes per second)
        21.93 megabytes written (14.10 kilobytes per second)
pm>



UDF new:
pm>set transactions 2000
pm>set number 3000
pm>run
Creating files...Done
Performing transactions..........Done
Deleting files...Done
Time:
        19 seconds total
        3 seconds of transactions (666 per second)

Files:
        3956 created (208 per second)
                Creation alone: 3000 files (230 per second)
                Mixed with transactions: 956 files (318 per second)
        990 read (330 per second)
        1010 appended (336 per second)
        3956 deleted (208 per second)
                Deletion alone: 2912 files (970 per second)
                Mixed with transactions: 1044 files (348 per second)

Data:
        5.26 megabytes read (283.66 kilobytes per second)
        21.93 megabytes written (1.15 megabytes per second)
2008-07-17 19:10:22 +00:00
reinoud 441bae21b1 Dont round up nanosecond count; if its nearing wrap one could get a count
of >1 second resulting in invalid time stamps on disc.
2008-07-17 15:37:59 +00:00
reinoud 31a383903d Since the rename logic now locks its source directory too, we ought to
unlock the source directory again on exit. The stub that doesn't allow
cross directory renames for now jumped to the wrong exit point and thus
left a locked directory node that paniced on next locking.
2008-07-17 11:00:29 +00:00
reinoud d61a135a38 Make UDF allocation-sanity check optional even if the DEBUG flag is
specified. This should be sysctl-able when compiled with the DEBUG flag
eventually.
2008-07-16 09:36:08 +00:00
reinoud e4424d53b1 Keep the directory to read '..' from locked until its dirent is read and
its location is extracted.

Also lock the source directory so its contents can safely be changed...
patch from tmpfs.
2008-07-15 15:49:05 +00:00
reinoud b62b494f22 Fix spelling in comment 2008-07-11 15:16:53 +00:00
reinoud 4503919107 Fix chtimes permission checking. This sanitised version is hopefully DTRT. 2008-07-10 17:38:31 +00:00
reinoud cb6e2404af On node creation, follow tmpfs and UFS by generating the uid/gid pair. This
fixes the lack of file ownership preservation on file/directory creation.

See PR kern/39124
2008-07-10 16:41:00 +00:00
reinoud 0381f71bf3 Allow the renaming of directories *within* their current directory. No
cross-directory renaming is allowed yet.
2008-07-10 15:29:51 +00:00
reinoud e3eced36a8 Clarifying comments 2008-07-10 14:16:02 +00:00
reinoud e367a2e837 Force allocation extent descriptor CRC length to 8 for UDF versions prior
to version 2.01.
2008-07-09 18:10:57 +00:00
reinoud 4d5c88faa5 Support for allocation extents descriptor writing to allow for arbitrary
heavily fragmented files.

Also fixing some (rare) allocation bugs and function name streamlining.

Tested on harddisc, CD-RW and CD-R i.e. all three basic backend classes.
2008-07-07 18:45:26 +00:00
reinoud ef780ea2df Add node-rebuild flag to indicate that the node was rebuild up and thus the
allocation extents have changed.
2008-07-03 19:29:42 +00:00
reinoud 2cd20af057 Create new udf_verbose class. 2008-07-03 18:03:22 +00:00
reinoud d3bf9c7bba Fix rare allocation problem when a fragmented file is truncated to a
non-zero length and the last extent was allocated.
2008-07-03 18:03:01 +00:00
reinoud 0687ceb21e Avoid panic when trying to mount a non existent block device like a
/dev/vnd0 that is not configured.
2008-07-03 18:01:08 +00:00
reinoud 5eeb4f695a Update node sanity check system and redo allocation recording fixing
corruptions that could take place when overwriting sparse files.

Still one rare corruption possible where blocks are accidentally marked
free, but the cause is not yet found and looking at the pattern it won't
happen in every day use.
2008-07-02 13:25:33 +00:00
reinoud af39897a83 Fix serious allocation recording bug if overwriting piece that was
allocated before. Fixes regression test on random overwriting data.

Also fix endian issues and add extra documentation to variables.
2008-06-30 16:43:13 +00:00
perry 10cfc49bff __FUNCTION__ -> __func__ 2008-06-30 00:46:41 +00:00
rumble f0fae83846 In smbfs_done, do not call pool_destroy on the same pool twice in a row.
Now smbfs.kmod can be unloaded without panicking the system.
2008-06-29 18:45:20 +00:00
reinoud 14d24a6772 When shrinking the file, do clean the freed part in the descriptor; all
unused space need to be zero filled.
2008-06-28 14:47:11 +00:00
rumble 28f5ebd853 Create sysctl entries during module initialisation and destroy them
appropriately.

Many of these file systems are now ready for modularisation.
2008-06-28 01:34:05 +00:00
reinoud d769966488 Count the length correctly when encountering an allocation extension
redirect in the sanity checking.
2008-06-26 13:28:45 +00:00