#
aa90fbed |
| 28-Jan-2025 |
Kirk McKusick <mckusick@FreeBSD.org> |
Standardize the definition of a UFS dinode.
Each program that operates on UFS on-disk inodes defines its own version of a dinode. They all (of necessity) define the same layout but use different nam
Standardize the definition of a UFS dinode.
Each program that operates on UFS on-disk inodes defines its own version of a dinode. They all (of necessity) define the same layout but use different names. This change adds a definition of a dinode (a union of a UFS1 on-disk inode and a UFS2 on-disk inode) as well as a dinodep (a union of a pointer to a UFS1 on-disk inode and a pointer to a UFS2 on-disk inode) in sys/ufs/ufs/dinode.h. It then deletes the definitions of dinode and dinodep in all the programs that operate on them and instead uses these standard definitions.
No functional change intended.
MFC-after: 1 week
show more ...
|
Revision tags: release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0 |
|
#
176b9e0d |
| 25-Jan-2024 |
Ed Maste <emaste@FreeBSD.org> |
makefs: warn that ffs sectorsize other than 512 may not work
newfs always sets sectorsize to DEV_BSIZE (512) and derives some other values based on the number of 512-byte sectors per real sector. S
makefs: warn that ffs sectorsize other than 512 may not work
newfs always sets sectorsize to DEV_BSIZE (512) and derives some other values based on the number of 512-byte sectors per real sector. Similar logic is required in makefs. Until that happens, emit a warning that the image may be incorrect.
PR: 276571
show more ...
|
#
8a7b6120 |
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
usr.sbin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a p
usr.sbin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script.
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
1d386b48 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
Revision tags: release/13.2.0 |
|
#
e5551216 |
| 13-Mar-2023 |
Ed Maste <emaste@FreeBSD.org> |
makefs: call brelse from bread
This matches NetBSD and rationalizes makefs with the kernel API.
This reverts commit 370e009188ba90c3290b1479aa06ec98b66e140a.
Reviewed by: mckusick Sponsored by: Th
makefs: call brelse from bread
This matches NetBSD and rationalizes makefs with the kernel API.
This reverts commit 370e009188ba90c3290b1479aa06ec98b66e140a.
Reviewed by: mckusick Sponsored by: The FreeBSD Foundation Obtained from: NetBSD 0a62dad69f62, 0c4125e1a19f, cb6a5a3575fd Differential Revision: https://reviews.freebsd.org/D39070
show more ...
|
#
45e40560 |
| 30-Mar-2023 |
Ed Maste <emaste@FreeBSD.org> |
makefs: do not pass mode to open() call lacking O_CREAT
Obtained from: OpenBSD ffs.c 1.35
|
Revision tags: release/12.4.0 |
|
#
06a400d7 |
| 20-Sep-2022 |
Ed Maste <emaste@FreeBSD.org> |
makefs: whitespace cleanup (remove space before tab)
MFC after: 1 week
|
#
ecdc04d0 |
| 17-May-2022 |
Alan Somers <asomers@FreeBSD.org> |
makefs: fix calculation of file sizes
When a new FS image is created we need to calculate how much space each file is going to consume. Fix two bugs in that logic:
1) Count the space needed for ind
makefs: fix calculation of file sizes
When a new FS image is created we need to calculate how much space each file is going to consume. Fix two bugs in that logic:
1) Count the space needed for indirect blocks for large files. 1) Normally the trailing data of a file is written to a block of frag size, 4 kB by default.
However for files that use indirect blocks a full block is allocated, 32kB by default. Take that into account.
Adjust size calculations to match what is done in ffs_mkfs routine:
* Depending on the UFS version the superblock is stored at a different offset. Take that into account. * Add the cylinder group block size. * All of the above has to be aligned to the block size.
Finally, Remove "ncg" variable. It's always 1 and it was used to multiply stuff.
PR: 229929 Reviewed by: mckusick MFC after: 2 weeks Sponsored by: Semihalf Submitted by: Kornel Dulęba <mindal@semihalf.com> Differential Revision: https://reviews.freebsd.org/D35131 Differential Revision: https://reviews.freebsd.org/D35132
show more ...
|
Revision tags: release/13.1.0 |
|
#
cc1a53bc |
| 29-Apr-2022 |
Mark Johnston <markj@FreeBSD.org> |
makefs: Fix warnings and reset WARNS to the default
Leave -Wcast-align disabled, at least for now, since there are numerous instances of that warning in places where buffer pointers are cast to poin
makefs: Fix warnings and reset WARNS to the default
Leave -Wcast-align disabled, at least for now, since there are numerous instances of that warning in places where buffer pointers are cast to pointers to various filesystem structures. Fixing this properly would be too much work for too little gain.
MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
show more ...
|
#
5b13fa79 |
| 02-Jan-2022 |
Jessica Clarke <jrtc27@FreeBSD.org> |
ufs: Rework shortlink handling to avoid subobject overflows
Shortlinks occupy the space of both di_db and di_ib when used. However, everywhere that wants to read or write a shortlink takes a pointer
ufs: Rework shortlink handling to avoid subobject overflows
Shortlinks occupy the space of both di_db and di_ib when used. However, everywhere that wants to read or write a shortlink takes a pointer do di_db and promptly runs off the end of it into di_ib. This is fine on most architectures, if a little dodgy. However, on CHERI, the compiler can optionally restrict the bounds on pointers to subobjects to just that subobject, in order to mitigate intra-object buffer overflows, and this is enabled in CheriBSD's pure-capability kernels.
Instead, clean this up by inserting a union such that a new di_shortlink can be added with the right size and element type, avoiding the need to cast and allowing the use of the DIP macro to access the field. This also mirrors how the ext2fs code implements extents support, with the exact same structure other than having a uint32_t i_data[] instead of a char di_shortlink[].
Reviewed by: mckusick, jhb Differential Revision: https://reviews.freebsd.org/D33650
show more ...
|
Revision tags: release/12.3.0, release/13.0.0 |
|
#
afb6a168 |
| 06-Apr-2021 |
Nathan Whitehorn <nwhitehorn@FreeBSD.org> |
Allocate extra inodes in makefs when leaving free space in UFS images.
By default, makefs(8) has very few spare inodes in its output images, which is fine for static filesystems, but not so great fo
Allocate extra inodes in makefs when leaving free space in UFS images.
By default, makefs(8) has very few spare inodes in its output images, which is fine for static filesystems, but not so great for VM images where many more files will be added. Make makefs(8) use the same default settings as newfs(8) when creating images with free space -- there isn't much point to leaving free space on the image if you can't put files there. If no free space is requested, use current behavior of a minimal number of available inodes.
Reviewed by: manu MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D29492
show more ...
|
#
d485c77f |
| 18-Feb-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Remove #define _KERNEL hacks from libprocstat
Make sys/buf.h, sys/pipe.h, sys/fs/devfs/devfs*.h headers usable in userspace, assuming that the consumer has an idea what it is for. Unhide more materi
Remove #define _KERNEL hacks from libprocstat
Make sys/buf.h, sys/pipe.h, sys/fs/devfs/devfs*.h headers usable in userspace, assuming that the consumer has an idea what it is for. Unhide more material from sys/mount.h and sys/ufs/ufs/inode.h, sys/ufs/ufs/ufsmount.h for consumption of userspace tools, with the same caveat.
Remove unacceptable hack from usr.sbin/makefs which relied on sys/buf.h being unusable in userspace, where it override struct buf with its own definition. Instead, provide struct m_buf and struct m_vnode and adapt code to use local variants.
Reviewed by: mckusick Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D28679
show more ...
|
Revision tags: release/12.2.0, release/11.4.0 |
|
#
1e9f67e2 |
| 15-Nov-2019 |
Alex Richardson <arichardson@FreeBSD.org> |
makefs: Also set UFS di_birthtime when building on Linux
Since st_birthtime doesn't exists on Linux (unless you use statx(2)), we instead populate it with the st_ctime value.
Reviewed By: emaste Di
makefs: Also set UFS di_birthtime when building on Linux
Since st_birthtime doesn't exists on Linux (unless you use statx(2)), we instead populate it with the st_ctime value.
Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D22386
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
b18a4cca |
| 05-Mar-2019 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r344786
|
#
844fc3e9 |
| 04-Mar-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r344549 through r344775.
|
#
781e7818 |
| 26-Feb-2019 |
Maxim Sobolev <sobomax@FreeBSD.org> |
Improve error handling: bail out if one of the files scheduled to go to the FS image we are making cannot be read (e.g. EPERM). Current behaviour when we issue waring but still proceeed and return su
Improve error handling: bail out if one of the files scheduled to go to the FS image we are making cannot be read (e.g. EPERM). Current behaviour when we issue waring but still proceeed and return success is definitely not correct: masking out error condition as well as making a slighly inconsistent FS where attempt to access the file in question ends up in EBADF. See linked DR for details.
MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D18584
show more ...
|
Revision tags: release/12.0.0 |
|
#
14b841d4 |
| 11-Aug-2018 |
Kyle Evans <kevans@FreeBSD.org> |
MFH @ r337607, in preparation for boarding
|
#
5b292f9a |
| 26-Jul-2018 |
Ed Maste <emaste@FreeBSD.org> |
makefs: use FreeBSD brelse function signature
Although the ffs (and later msdosfs) implementation in makefs is independent of the one in kernel, it makes sense to keep differences to a minimum in or
makefs: use FreeBSD brelse function signature
Although the ffs (and later msdosfs) implementation in makefs is independent of the one in kernel, it makes sense to keep differences to a minimum in order to ease comparison and porting changes across.
Submitted by: Siva Mahadevan Sponsored by: The FreeBSD Foundation
show more ...
|
Revision tags: release/11.2.0 |
|
#
c93ff841 |
| 30-Mar-2018 |
Ed Maste <emaste@FreeBSD.org> |
makefs: sync fragment and block size with newfs
r222319 in newfs raised the default blocksize for UFS/FFS filesystems from 16K to 32K and the default fragment size from 2K to 4K, with a rationale th
makefs: sync fragment and block size with newfs
r222319 in newfs raised the default blocksize for UFS/FFS filesystems from 16K to 32K and the default fragment size from 2K to 4K, with a rationale that most disks were now running with 4K sectors.
MFC after: 2 weeks Relnotes: Yes Sponsored by: The FreeBSD Foundation
show more ...
|
#
5f401182 |
| 16-Jan-2018 |
Alex Richardson <arichardson@FreeBSD.org> |
Allow xinstall and makefs to be crossbuilt on Linux and Mac
I need these tools in order to install the crossbuilt FreeBSD and create a disk image. Linux does not have a st_flags in struct stat so un
Allow xinstall and makefs to be crossbuilt on Linux and Mac
I need these tools in order to install the crossbuilt FreeBSD and create a disk image. Linux does not have a st_flags in struct stat so unfortunately I need a bunch of ugly ifdefs. The resulting binaries allow me to sucessfully install a MIPS64 world and create a disk-image that boots.
Reviewed By: brooks, bdrewery, emaste Approved By: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D13307
show more ...
|
#
3836e359 |
| 16-Dec-2017 |
Mark Johnston <markj@FreeBSD.org> |
Fix a logic bug in makefs lazy inode initialization.
We may need to initialize multiple inode blocks before writing a given inode. makefs(8) was only initializing a single block at a time, so certai
Fix a logic bug in makefs lazy inode initialization.
We may need to initialize multiple inode blocks before writing a given inode. makefs(8) was only initializing a single block at a time, so certain inode allocation patterns could lead to a situation where it wrote an inode to an uninitialized block. That inode might be clobbered by a later initialization, resulting in a filesystem image containing directory entries that point to a seemingly unused inode.
Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D13505
show more ...
|
#
937d37fc |
| 19-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r325842 through r325998.
|
#
df57947f |
| 18-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
spdx: initial adoption of licensing ID tags.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensou
spdx: initial adoption of licensing ID tags.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point.
Initially, only tag files that use BSD 4-Clause "Original" license.
RelNotes: yes Differential Revision: https://reviews.freebsd.org/D13133
show more ...
|
Revision tags: release/10.4.0, release/11.1.0 |
|
#
4224465e |
| 02-Jun-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r319251 through r319479.
|
#
5d7af8bb |
| 31-May-2017 |
Ed Maste <emaste@FreeBSD.org> |
makefs: free buf in case of error
CID: 270190 Submitted by: Siva Mahadevan <smahadevan@freebsdfoundation.org> Reported by: Coverity Sponsored by: The FreeBSD Foundation Differential Revision: https
makefs: free buf in case of error
CID: 270190 Submitted by: Siva Mahadevan <smahadevan@freebsdfoundation.org> Reported by: Coverity Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11011
show more ...
|