summaryrefslogtreecommitdiffstats
path: root/sys/fs/ext2fs/ext2_subr.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r310705, r310706:pfg2017-01-041-0/+1
| | | | | | style(9) cleanups. Just to reduce some of the issues found with indent(1).
* MFC r260988, r261034, r261120, r261235:pfg2014-01-311-4/+4
| | | | | | | | | | | | | | | | ext2fs: Properly the EXT4_EXTENTS and EXT4_INDEX to the inode flags. In order to support Ext4 extents we need to pass the Ext4 inode flags without interfering with the chflags. This is better done by using the i_flag field in the inode and doing proper translation to the linux ext4 equivalents. Solve a potential corruption issue in the dirindex code. The dirindex code can now be renabled as the problems related to it have been solved. Suggested by: bde Tested by: kevlo
* ext2fs: update format specifiers for ext4 type.pfg2013-08-141-4/+4
| | | | | | | | | Previous bandaid was not appropriate and didn't really work for all platforms. While here, cleanup the surrounding code to match ffs_checkoverlap() Reported by: dim, jmallet and bde MFC after: 3 weeks
* ext2fs: update format specifiers for ext4 type.pfg2013-08-131-1/+1
| | | | | Reported by: Sam Fourman Jr. MFC after: 3 weeks
* Define ext2fs local types and use them.pfg2013-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* Add read-only support for extents in ext2fs.pfg2013-08-121-4/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | Basic support for extents was implemented by Zheng Liu as part of his Google Summer of Code in 2010. This support is read-only at this time. In addition to extents we also support the huge_file extension for read-only purposes. This works nicely with the additional support for birthtime/nanosec timestamps and dir_index that have been added lately. The implementation may not work for all ext4 filesystems as it doesn't support some features that are being enabled by default on recent linux like flex_bg. Nevertheless, the feature should be very useful for migration or simple access in filesystems that have been converted from ext2/3 or don't use incompatible features. Special thanks to Zheng Liu for his dedication and continued work to support ext2 in FreeBSD. Submitted by: Zheng Liu (lz@) Reviewed by: Mike Ma, Christoph Mallon (previous version) Sponsored by: Google Inc. MFC after: 3 weeks
* Define and use e2fs_lbn_t in ext2fs.pfg2013-06-231-1/+1
| | | | | | | | | | | | | | | | | | 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
* ext2fs: Use prototype declarations for function definitionspfg2013-02-101-8/+2
| | | | | Submitted by: Christoph Mallon MFC after: 2 weeks
* Bring in reallocblk to ext2fs.pfg2011-12-151-0/+104
| | | | | | | | | | | | | | | | | The feature has been standard for a while in UFS as a means to reduce fragmentation, therefore maintaining consistent performance with filesystem aging. This is also very similar to what ext4 calls "delayed allocation". In his 2010 GSoC, Zheng Liu ported and benchmarked the missing FANCY_REALLOC code to find more consistent performance improvements than with the preallocation approach. PR: 159233 Author: Zheng Liu <gnehzuil AT SPAMFREE gmail DOT com> Sponsored by: Google Inc. Approved by: jhb (mentor) MFC after: 2 weeks
* Fix build with KDB defined.jhb2011-01-191-0/+2
| | | | | Pointy hat to: jhb Submitted by: jkim
* Merge 118969 from UFS:jhb2011-01-191-1/+1
| | | | | | | | Eliminate the i_devvp field from the incore inodes, we can get the same value from ip->i_ump->um_devvp. Submitted by: Pedro F. Giffuni giffunip at yahoo MFC after: 1 week
* Bring in the ext2fs work done by Aditya Sarawgi during and after Google Summerlulf2010-01-141-0/+120
of Code 2009: - BSDL block and inode allocation policies for ext2fs. This involves the use FFS1 style block and inode allocation for ext2fs. Preallocation was removed since it was GPL'd. - Make ext2fs MPSAFE by introducing locks to per-mount datastructures. - Fixes for kern/122047 PR. - Various small bugfixes. - Move out of gnu/ directory. Sponsored by: Google Inc. Submitted by: Aditya Sarawgi <sarawgi.aditya AT SPAMFREE gmail DOT com>
OpenPOWER on IntegriCloud