summaryrefslogtreecommitdiffstats
path: root/lib/libufs/sblock.c
Commit message (Collapse)AuthorAgeFilesLines
* - Merge soft-updates journaling from projects/suj/head into head. Thisjeff2010-04-241-0/+50
| | | | | | | | brings in support for an optional intent log which eliminates the need for background fsck on unclean shutdown. Sponsored by: iXsystems, Yahoo!, and Juniper. With help from: McKusick and Peter Holm
* i doesn't need to be signed here, make it unsigned.imp2010-02-111-1/+1
|
* Reduce diffs with code in Perforce:jmallett2003-06-091-6/+6
| | | | Parenthesise return values.
* Clean up error reporting in block.c, so that it gives honest error stringsjmallett2003-02-191-4/+4
| | | | | | | | | | | | | | | | | | | | for the sorts of errors we run into[1]. This also gives us room to put in a vaguely appropriate casts to silence warnings since our compiler doesn't like when we compare ssize_t to size_t[2]. Add a cast in sblock.c[3] to silence a warning because of signed vs. size_t hell (again). Clean up nearby excessive parenthemutilation[4]. Reviewed by: bde [2] [3] Suggested by: bde, many [1] Submitted by: bde [4] An aside about [4], bde notes that we do not check for a negative value for the fs bsize. I'm nto going to do that in every situation we use it, one must expect a reasonable program to pass down reasonable values. Some foot shooting protection I will tolerate, some I will not. Also he suggests some possible conditional improvements there, which I may take to heart. PS: For me at least, this is now WARNS=5 clean...
* If we don't know where the sblock is (e.g. filling out a blank disk), thenjmallett2003-01-271-0/+4
| | | | | | | get it from the fs structure. Really libufs should have interfaces to generate both what we export, and what we import, based on eachother, and this should be full of redundant code to make sure everything is right... But really, we don't even deal with checksums, so plenty of room to improve.
* bwrite, not sbwrite, needs to open for writing and write.jmallett2003-01-231-10/+1
|
* Nuke dumb error reporting code, people can just use disk::d_error. Unify thejmallett2003-01-181-12/+7
| | | | | DEBUG and d_error initialisation into an ERROR macro, which can both trace and set the d_error field. Much a more meaningful thing, I should say.
* Create a new 32-bit fs_flags word in the superblock. Add code to movemckusick2002-11-271-1/+1
| | | | | | | | | | | | | | | | | the old 8-bit fs_old_flags to the new location the first time that the filesystem is mounted by a new kernel. One of the unused flags in fs_old_flags is used to indicate that the flags have been moved. Leave the fs_old_flags word intact so that it will work properly if used on an old kernel. Change the fs_sblockloc superblock location field to be in units of bytes instead of in units of filesystem fragments. The old units did not work properly when the fragment size exceeeded the superblock size (8192). Update old fs_sblockloc values at the same time that the flags are moved. Suggested by: BOUWSMA Barry <freebsd-misuser@netscum.dyndns.dk> Sponsored by: DARPA & NAI Labs.
* Use an error message closer to old dumpfs(8) in the case of truncated/nojmallett2002-10-221-1/+1
| | | | | | | | | superblock. Submitted by: kkenn Can't use it verbatim, at least I hate to, as the ", skipped" bit doesn't make much sense in a library, to me.
* Add the concept of a per-disk error string, and a function which prints itjmallett2002-10-221-0/+5
| | | | along with the errno, if one is set.
* In getino, have our DEBUG message in the unhandled case mention that itjmallett2002-07-011-0/+2
| | | | | | does not know what sort of UFS filesystem this is. Add some DEBUG(NULL)'s to function entry points.
* Add libufs, a library for dealing with UFS filesystems from userland tojmallett2002-07-011-0/+122
the build. It is here to compartmentalise functionality currently duplicated in many notable programs in the base system. It currently handles block reads and writes, as well as reading and writing of the filesystem superblock, and the reading/lookup of inode data. It supports both UFS and UFS2. I will be maintaining it, and porting programs to use it, however for now, it is simply being built as part of world.
OpenPOWER on IntegriCloud