| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
|
| |
|
|
|
|
| |
PR: 261850
Reported by: chenguang.wang
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To quote from a comment above vput_final:
<quote>
* XXX Some filesystems pass in an exclusively locked vnode and strongly depend
* on the lock being held all the way until VOP_INACTIVE. This in particular
* happens with UFS which adds half-constructed vnodes to the hash, where they
* can be found by other code.
</quote>
As is there is no mechanism which allows filesystems to denote that a
vnode is fully initialized, consequently problems like the above are
only found the hard way(tm).
Add rudimentary support for state transitions, which in particular allow
to assert the vnode is not legally unlocked until its fate is decided
(either construction finishes or vgone is called to abort it).
The new field lands in a 1-byte hole, thus it does not grow the struct.
Bump __FreeBSD_version to 1400077
Reviewed by: kib (previous version)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D37759
|
| |
|
|
|
|
|
|
| |
- s/quadradically/quadratically/
- s/persistant/persistent/
Obtained from: NetBSD
MFC after: 3 days
|
| |
|
|
|
|
|
|
| |
Obtained from: Dragonfly
MFC after: 3 days
Notes:
svn path=/head/; revision=366501
|
| |
|
|
| |
Notes:
svn path=/head/; revision=365070
|
| |
|
|
|
|
|
|
|
|
|
| |
PR: 240545
Submitted by: Andrew Reiter <arr@watson.org>
Reviewed by: fsu
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25707
Notes:
svn path=/head/; revision=363367
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Author of most initial version: pfg (https://reviews.freebsd.org/D23259)
Reviewed by: pfg
MFC after: 3 months
Differential Revision: https://reviews.freebsd.org/D24685
Notes:
svn path=/head/; revision=361136
|
| |
|
|
|
|
|
|
|
|
| |
Make ext2fs compatible with changes introduced in e2fsprogs v1.45.2.
Now the tail of inode bitmap is filled with 0xff pattern explicitly during
bitmap initialization phase to avoid e2fsck error like:
"Padding at end of inode bitmap is not set."
Notes:
svn path=/head/; revision=361133
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Mark all obvious cases as MPSAFE. All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT
Approved by: kib (mentor, blanket)
Commented by: kib, gallatin, melifaro
Differential Revision: https://reviews.freebsd.org/D23718
Notes:
svn path=/head/; revision=358333
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coccinelle:
@ rule1 @
identifier __error;
@@
...
int __error;
...
@ rule2 depends on rule1 @
identifier rule1.__error;
identifier __bp;
@@
__error =
(
bread
|
bread_gb
|
breadn
|
breadn_flags
)
(..., &__bp);
if (
(
__error
|
__error != 0
)
) {
...
- brelse(__bp);
...
}
No functional change.
Notes:
svn path=/head/; revision=351926
|
| |
|
|
|
|
|
|
|
|
| |
Reviewed by: pfg, gnn
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D19848
Notes:
svn path=/head/; revision=346267
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The ext2_nodealloccg() function unlocks the mount point
in case of successful node allocation.
The additional unlocks are not required and should be removed.
PR: 236452
Reported by: pho
MFC after: 3 days
Notes:
svn path=/head/; revision=345179
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Reported by: Christopher Krah <krah@protonmail.com>
Reported as: FS-6-EXT2-4: Denial Of Service in mkdir-0 (ext2_mkdir/vn_rdwr)
Reviewed by: pfg
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D19327
Notes:
svn path=/head/; revision=344756
|
| |
|
|
|
|
|
|
|
|
|
|
| |
admbug: 804
Reported by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Reviewed by: pfg
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D19325
Notes:
svn path=/head/; revision=344754
|
| |
|
|
|
|
|
|
|
|
| |
Reviewed by: pfg
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D19324
Notes:
svn path=/head/; revision=344753
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add more on-disk superblock consistency checks to ext2_compute_sb_data() function.
It should decrease the probability of mounting filesystems with corrupted superblock data.
Reviewed by: pfg
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D19322
Notes:
svn path=/head/; revision=344751
|
| |
|
|
|
|
|
| |
Make it more close to native ext4 implementation to avoid fsck errors.
Notes:
svn path=/head/; revision=338151
|
| |
|
|
|
|
|
|
|
|
| |
Reviewed by: pfg
MFC after: 3 months
Differential Revision: https://reviews.freebsd.org/D15394
Notes:
svn path=/head/; revision=333584
|
| |
|
|
| |
Notes:
svn path=/head/; revision=331095
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Followup to r313780. Also prefix ext2's and nandfs's versions with
EXT2_ and NANDFS_.
Reported by: kib
Reviewed by: kib, mckusick
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D9623
Notes:
svn path=/head/; revision=331083
|
| |
|
|
|
|
|
|
|
|
| |
Reviewed by: pfg
MFC after: 6 months
Differential Revision: https://reviews.freebsd.org/D13964
Notes:
svn path=/head/; revision=328564
|
| |
|
|
|
|
|
|
|
|
|
| |
Reviewed by: pfg (mentor)
Approved by: pfg (mentor)
MFC after: 6 months
Differential Revision: https://reviews.freebsd.org/D13810
Notes:
svn path=/head/; revision=327977
|
| |
|
|
|
|
|
|
|
|
|
| |
Reviewed by: kevlo, pfg (mentor)
Approved by: pfg (mentor)
MFC after: 6 months
Differential Revision: https://reviews.freebsd.org/D11530
Notes:
svn path=/head/; revision=327584
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 3-Clause license.
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.
Notes:
svn path=/head/; revision=326023
|
| |
|
|
|
|
|
|
| |
Approved by: pfg (mentor)
MFC after: 6 months
Notes:
svn path=/head/; revision=324963
|
| |
|
|
|
|
|
|
|
|
| |
possibility of filesystem corruption.
Approved by: pfg (mentor)
MFC after: 2 weeks
Notes:
svn path=/head/; revision=324962
|
| |
|
|
|
|
|
|
|
|
|
| |
Approved by: pfg (mentor)
MFC after: 6 months
RelNotes: Yes
Differential Revision: https://reviews.freebsd.org/D12087
Notes:
svn path=/head/; revision=324706
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
feature.
Use the Linux logic for now.
Reviewed by: pfg (mentor)
Approved by: pfg (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D12131
Notes:
svn path=/head/; revision=324064
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From the linux tune2fs(8) manpage:
"Allow the kernel to initialize bitmaps and inode tables and keep a high
watermark for the unused inodes in a filesystem, to reduce e2fsck(8) time.
This first e2fsck run after enabling this feature will take the full time,
but subsequent e2fsck runs will take only a fraction of the original time,
depending on how full the file system is."
Submitted by: Fedor Uporov
Differential Revision: https://reviews.freebsd.org/D11211
Notes:
svn path=/head/; revision=320145
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extended attributes and their particular implementation in linux are
different from FreeBSD so in this case we have started diverging from
the UFS EA implementation, which would be the natural reference.
Depending on future progress implementing ACLs this approach may change
but for now bring to the tree an implementation that is consistent and
can be tested.
Submitted by: Fedor Uporov
Differential Revision: https://reviews.freebsd.org/D10460
Notes:
svn path=/head/; revision=317779
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically:
ROOTINO -> UFS_ROOTINO
WINO -> UFS_WINO
NXADDR -> UFS_NXADDR
NDADDR -> UFS_NDADDR
NIADDR -> UFS_NIADDR
MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)
Also prefix ext2's and nandfs's NDADDR and NIADDR with EXT2_ and NANDFS_
Reviewed by: kib, mckusick
Obtained from: NetBSD
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D9536
Notes:
svn path=/head/; revision=313780
|
| |
|
|
|
|
|
| |
Reported by: kib
Notes:
svn path=/head/; revision=310706
|
| |
|
|
|
|
|
|
|
| |
Just to reduce some of the issues found with indent(1).
MFC after: 1 week
Notes:
svn path=/head/; revision=310705
|
| |
|
|
|
|
|
|
|
|
| |
This is to keep consistency with other files, and help license-checking
utilities determine the number of clauses that apply.
No functional change.
Notes:
svn path=/head/; revision=309439
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ext2/3/4 manages generation numbers differently than UFS so adopt
some rules that should work well. When allocating a new inode,
make sure we generate a "good" random value specifically avoiding
zero.
Don't interfere with the numbers that are already generated in
the filesystem: ext2fs doesn't have the backwards compatibility
issues where there were no generation numbers.
Reviewed by: kevlo
MFC after: 1 week
Notes:
svn path=/head/; revision=301548
|
| |
|
|
|
|
|
|
|
|
|
| |
i_gen if it's zero rather than a divide by 2.
With inputs from delphij, mckusick, rmacklem
Reviewed by: mckusick
Notes:
svn path=/head/; revision=300423
|
| |
|
|
|
|
|
|
|
|
|
|
| |
While here do late initialization of ebap, similar as was
done in UFS.
Found with devel/coccinelle.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=297796
|
| |
|
|
|
|
|
|
|
|
|
|
| |
on ext2/3/4.
While here use arc4random() instead of random().
Reviewed by: pfg
MFC after: 3 days
Notes:
svn path=/head/; revision=297479
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We use i_flag to carry some flags like IN_E4INDEX which newer
ext2fs variants uses internally.
fsck.ext3 rightfully complains after our implementation tags
non-directory inodes with INDEX_FL.
Initializing i_flag during allocation removes the noise factor
and quiets down fsck.
Patch from: Damjan Jovanovic
PR: 206530
Notes:
svn path=/head/; revision=294652
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the ext2 variant of the "orlov allocator" was implemented,
the case for a negative or zero dirsize disappeared.
Drop the dead code and unsign dirsize given that it can't be
negative anyways.
CID: 1008669
MFC after: 1 week
Notes:
svn path=/head/; revision=277340
|
| |
|
|
|
|
|
|
|
| |
ino_t and dev_t are about to become uint64_t.
Reviewed by: kib, mckusick
Notes:
svn path=/head/; revision=275856
|
| |
|
|
|
|
|
|
|
|
|
|
| |
ext2fs: minor update to the dirpref policy.
The change in UFS r254996, reverted the change as the
older code seems to work better. This was not visible
in local testing but we can trust UFS is vastly more
exercised in diferent environments.
Notes:
svn path=/head/; revision=263463
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Bring in a minor change to the dirpref policy based on r248623.
This is pretty minimal change to keep the implementation in
sync with UFS but other parts from the original change are not
directly applicable so don't expect improvements in fsck times.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=263449
|
| |
|
|
|
|
|
|
|
|
| |
Remove some redundant spaces.
No functional change.
MFC after: 3 days
Notes:
svn path=/head/; revision=262667
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Consistently use a single tab after a #define as mentioned in style(9).
Use tabs instead of space for indenting.
Fix a typo: "hash_vesion".
No functional change.
MFC after: 3 days
Notes:
svn path=/head/; revision=262623
|
| |
|
|
|
|
|
|
|
|
| |
The major corruption issues affecting this code have been fixed
a while ago.
MFC after: 1 week
Notes:
svn path=/head/; revision=261136
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add definitions for e2fs_daddr_t, e4fs_daddr_t in addition
to the already existing e2fs_lbn_t and adjust them for ext4.
Other than making the code more readable these changes should
fix problems related to big filesystems.
Setting the proper types can be tricky so the process was
helped by looking at UFS. In our implementation, logical block
numbers can be negative and the code depends on it. In ext2,
block numbers are unsigned so it is convenient to keep
e2fs_daddr_t unsigned and use the complete 32 bits. In the
case of e4fs_daddr_t, while the value should be unsigned, for
ext4 we only need to support 48 bits so preserving an extra
bit from the sign is not an issue.
While here also drop the ext2_setblock() prototype that was
never used.
Discussed with: mckusick, bde
MFC after: 3 weeks
Notes:
svn path=/head/; revision=254283
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In line to what is done in UFS, define an internal type
e2fs_lbn_t for the logical block numbers.
This change is basically a no-op as the new type is unchanged
(int32_t) but it may be useful as bumping this may be required
for ext4fs.
Also, as pointed out by Bruce Evans:
-Use daddr_t for daddr in ext2_bmaparray(). This seems to
improve reliability with the reallocblks option.
- Add a cast to the fsbtodb() macro as in UFS.
Reviewed by: bde
MFC after: 3 days
Notes:
svn path=/head/; revision=252103
|