History log of /freebsd/sys/fs/msdosfs/msdosfsmount.h (Results 1 – 25 of 118)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/14.0.0
# 71625ec9 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c comment pattern

Remove /^/[*/]\s*\$FreeBSD\$.*\n/


Revision tags: release/13.2.0
# c33db74b 29-Mar-2023 Stefan Eßer <se@FreeBSD.org>

fs/msdosfs: add tracking of free root directory entries

This update implements tallying of free directory entries during
create, delete, or rename operations on FAT12 and FAT16 file systems.

Prior

fs/msdosfs: add tracking of free root directory entries

This update implements tallying of free directory entries during
create, delete, or rename operations on FAT12 and FAT16 file systems.

Prior to this change, the total number of root directory entries
was reported as number of inodes, but 0 as the number of free
inodes, causing system health monitoring software to warn about
a suspected disk full issue.

The FAT12 and FAT16 file systems provide a limited number of
root directory entries, e.g. 512 on typical hard disk formats.
The valid range of values is 1 to 65535, but the msdosfs code
will effectively round up "odd" values to the next multiple of 16
(e.g. 513 would allow for 528 root directory entries).

This update implements tracking of directory entries during create,
delete, or rename operations, with initial values determined by
scanning the directory when the file system is mounted.

Total and free directory entries are reported in the f_files and
f_ffree elements of struct statfs, despite differences in semantics
of these values:

- There is no limit on the number of files and directories that can
be created on a FAT file system. Only the root directory of FAT12
and FAT16 file systems is limited, any number of files can still be
created in sub-directories, even when 0 free "inodes" are reported.

- A single file can require 1 to 21 directory entries, depending on
the character set, structure, and length of the name. The DOS 8.3
style file name takes up 1 entry, and if the name does not comply
with the syntax of a DOS 8.3 file name, 1 additional entry is used
for each 13 characters of the file name. Since all these entries
have to be contiguous, it is possible that a file or directory with
a long name can not be created, despite a sufficient total number of
free directory entries.

- Renaming a file can require more directory entries than currently
allocated to store its long name, which may prevent an in-place
update of the name if more entries are needed. This may cause a
rename operation to fail if no contiguous range of free entries for
the new name can be found.

- The volume label is stored in a directory entry. An empty FAT file
system with a volume label will therefore show 1 used "inode" in
df.

- The perceentage of free inodes shown in df or monitoring tools does
only represent the state of the root directory of a FAT12 or FAT16
file system. Neither does a reported value of 0% free inodes does
prevent files from being created in sub-directories, nor does a
value of 50% free inodes guarantee that even a single file with
a "long" name can be created in the root directory (if every other
directory entry is occupied and there are no 2 contiguous entries).

The statfs(2) and df(1) man pages have been updated with a notice
regarding the possibly different semantics of values reported as
total and free inodes for non-Unix file systems.

PR: 270053
Reported by: Ben Woods <woodsb02@freebsd.org>
Approved by: mckusick
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D38987

show more ...


Revision tags: release/12.4.0, release/13.1.0
# aaaa4fb5 06-Jan-2022 Konstantin Belousov <kib@FreeBSD.org>

msdosfs: use mntfs vnode for pm_devvp

to prevent races with devfs VCHR vnode reclamation, same as it was
done for UFS.

Reported by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC a

msdosfs: use mntfs vnode for pm_devvp

to prevent races with devfs VCHR vnode reclamation, same as it was
done for UFS.

Reported by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D33721

show more ...


# b2e4b635 25-Dec-2021 Konstantin Belousov <kib@FreeBSD.org>

msdosfs: add msdosfs_integrity_error()

A function to remount the filesystem from rw to ro on integrity error.
The work is performed in taskqueue to allow the call to be done from
almost arbitrary co

msdosfs: add msdosfs_integrity_error()

A function to remount the filesystem from rw to ro on integrity error.
The work is performed in taskqueue to allow the call to be done from
almost arbitrary context where erronous state was detected.

Tested by: pho
Reviewed by: markj, mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D33721

show more ...


Revision tags: release/12.3.0
# 6ae13c0f 07-Aug-2021 Konstantin Belousov <kib@FreeBSD.org>

msdosfs: add doscheckpath lock

Similar to the UFS revision 8df4bc48c89a130207

Reviewed by: mckusick
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: http

msdosfs: add doscheckpath lock

Similar to the UFS revision 8df4bc48c89a130207

Reviewed by: mckusick
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31464

show more ...


Revision tags: release/13.0.0, release/12.2.0
# 586ee69f 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

fs: clean up empty lines in .c and .h files


Revision tags: release/11.4.0
# 773bec08 27-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r357119 through r357178.


# 162ae9c8 27-Jan-2020 Alex Richardson <arichardson@FreeBSD.org>

Allow bootstrapping makefs on older FreeBSD hosts and Linux/macOS

In order to do so we need to install the msdosfs headers to the bootstrap
sysroot and avoid includes of kernel headers that may not

Allow bootstrapping makefs on older FreeBSD hosts and Linux/macOS

In order to do so we need to install the msdosfs headers to the bootstrap
sysroot and avoid includes of kernel headers that may not exist on every
host (e.g. sys/lockmgr.h). This change should allow bootstrapping of makefs
on FreeBSD 11+ as well as Linux and macOS.

We also have to avoid using the IO_SYNC macro since that may not be
available. In makefs it is only used to switch between calling
bwrite() and bdwrite() which both call the same function. Therefore we
can simply always call bwrite().

For our CheriBSD builds we always bootstrap makefs by setting
LOCAL_XTOOL_DIRS='lib/libnetbsd usr.sbin/makefs' and use the makefs binary
from the build tree to create a bootable disk image.

Reviewed By: brooks
Differential Revision: https://reviews.freebsd.org/D23201

show more ...


Revision tags: release/12.1.0
# f993ed2f 09-Sep-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r351732 through r352104.


# 4f0372f8 09-Sep-2019 Ed Maste <emaste@FreeBSD.org>

msdosfsmount.h: fix ifdef comment


# c5c3ba6b 03-Sep-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r351317 through r351731.


# 840aca28 01-Sep-2019 Ed Maste <emaste@FreeBSD.org>

makefs: share msdosfsmount.h between kernel msdosfs and makefs

Sponsored by: The FreeBSD Foundation


Revision tags: release/11.3.0, release/12.0.0, release/11.2.0
# d63027b6 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/fs: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error

sys/fs: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

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.

show more ...


Revision tags: release/10.4.0, release/11.1.0
# 686fb94a 10-Jun-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r319548 through r319778.


# 40373cf5 09-Jun-2017 Konstantin Belousov <kib@FreeBSD.org>

Remove msdosfs -o large support.

Its purpose was to translate the values for msdosfs inode numbers,
which is calculated from the msdosfs structures describing the file,
into the range representable

Remove msdosfs -o large support.

Its purpose was to translate the values for msdosfs inode numbers,
which is calculated from the msdosfs structures describing the file,
into the range representable by 32bit ino_t. The translation acted
for filesystems larger than 128Gb, it reserved the range 0xf0000000
(FILENO_FIRST_DYN) to UINT32_MAX and remembered some arbitrary
translation of ino >= FILENO_FIRST_DYN into this range. It consumed
memory that could be only freed by unmount, and the translation was
not stable across remounts.

With ino_t type extended to 64 bit, there is no such issue and values
can be returned without compaction to 32bit. That is, for the native
environments, the translation layer is not necessary and adds
significant undeserved code complexity. For compat ABIs which use
32bit ino_t, the vfs.ino64_trunc_error sysctl provides some measures
to soften the failure mode when inode numbers truncation is not safe.

Discussed with: bde
Sponsored by: The FreeBSD Foundation

show more ...


# 27c24068 22-May-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r318560 through r318657.


# 9287dbaa 21-May-2017 Ed Maste <emaste@FreeBSD.org>

msdosfs: capitalize FAT appropriately

Diff reduction with NetBSD, including some nearby minor whitespace or
style fixes.

Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation


# ea1e967c 19-May-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r318380 through r318559.


# 23c53312 19-May-2017 Ed Maste <emaste@FreeBSD.org>

msdosfs: use C99 types

General cleanup, for diff reduction with NetBSD and future use by FAT
support in makefs.

Submitted by: Siva Mahadevan <smahadevan@freebsdfoundation.org>
Obtained from: NetBSD

msdosfs: use C99 types

General cleanup, for diff reduction with NetBSD and future use by FAT
support in makefs.

Submitted by: Siva Mahadevan <smahadevan@freebsdfoundation.org>
Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10821

show more ...


Revision tags: release/11.0.1, release/11.0.0, release/10.3.0, release/10.2.0
# 416ba5c7 22-Jun-2015 Navdeep Parhar <np@FreeBSD.org>

Catch up with HEAD (r280229-r284686).


# 98e0ffae 27-May-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge sync of head


# 4bf53d0b 04-Apr-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Merge from HEAD


# e6e746bf 25-Mar-2015 Glen Barber <gjb@FreeBSD.org>

MFH: r278968-r280640

Sponsored by: The FreeBSD Foundation


# c66d17c7 22-Mar-2015 Konstantin Belousov <kib@FreeBSD.org>

msdosfs: mark unused compat-mount fields

The magic number MSDOSFS_ARGSMAGIC, which used to distinguish
"old" vs "new" msdosfs mount arguments, has not been used since
2005; it should just go away no

msdosfs: mark unused compat-mount fields

The magic number MSDOSFS_ARGSMAGIC, which used to distinguish
"old" vs "new" msdosfs mount arguments, has not been used since
2005; it should just go away now.

Likewise, the local-to-Unicode table that changed at the same
time is unused.

Leave the space reserved in the old style mount arguments, though,
since we still support the old mount call (via the cmount entry
point).

Submitted by: Chris Torek <chris.torek@gmail.com>
MFC after: 2 weeks

show more ...


Revision tags: release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0
# cfe30d02 19-Jun-2013 Gleb Smirnoff <glebius@FreeBSD.org>

Merge fresh head.


12345