summaryrefslogtreecommitdiffstats
path: root/sys/fs/ext2fs/ext2_htree.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r313897:pfg2017-02-241-1/+0
| | | | | | | | ext2fs: Remove unused assignment. The value is re-assigned a few lines later without being read. Found by: Clang static analyzer
* MFC r310705, r310706:pfg2017-01-041-17/+20
| | | | | | style(9) cleanups. Just to reduce some of the issues found with indent(1).
* ext2_htree_release(): prevent signed integer overflow in a loop.pfg2016-04-231-1/+1
| | | | | | | | | | h_levels_num, as most data structs in ext2fs, is unsigned so the index that addresses it has to be unsigned as well. To get to overflow here we would probably be considering a degenerate case though. MFC after: 5 days
* Rename some directory index constants.pfg2016-01-241-2/+2
| | | | | | Directory index was introduced in ext3. We don't always use the prefix to denote the ext2 variant they belong to but when we do we should try to be accurate.
* ext2fs: Bring back the htree dir_index implementation.pfg2016-01-211-0/+899
| | | | | | | | | | | | | | | | | | The htree dir_index is perhaps one of the most characteristic features of the linux ext3 implementation. It was removed in r281670, due to repeated bug reports. Damjan Jovanic detected and fixed three bugs and did some stress testing by building Apache OpenOffice on top of it so it is now in good shape to bring back. Differential Revision: https://reviews.freebsd.org/D5007 Submitted by: Damjan Jovanovic Reviewed by: pfg Tested by: pho Relnotes: Yes MFC after: 2 months (only 10.x)
* Drop experimental dir_index support.pfg2015-04-171-899/+0
| | | | | | | | | | | | | | | | | | | | | | | The htree directory index is a highly desirable feature for research purposes and was meant to improve performance in our ext2/3 driver. Unfortunately our implementation has two problems: - It never really delivered any performance improvement. - It appears to corrupt the filesystem in undetermined circumstances. Strictly speaking dir_index is not required for read/write support in ext2/3 and our limited ext4 support still works fine without it. Regain stability in the ext2 driver by removing it. We may need it back (fixed) if we want to support encrypted ext4 support but thanks to the wonders of version control we can always revert this change and bring it back. PR: 191895 PR: 198731 PR: 199309 MFC after: 5 days
* Reuse value of cursize instead of recalculating.pfg2015-02-151-1/+1
| | | | | Reported by: Clang static checker MFC after: 1 week
* ext2: Garbage-collect some unused variablespfg2015-01-191-2/+2
| | | | | Reported by: clang static analysis MFC after: 2 weeks
* ext2fs: Fix a bug when sorting htree entries.pfg2014-03-061-1/+1
| | | | | | | This a typo introduced when bringing the original code from NetBSD. Reported by: Mike Ma MFC after: 3 days
* ext2fs: use of tab vs spaces.pfg2014-02-281-1/+1
| | | | | | | | | | 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
* ext2fs: Use i_flag instead of i_flags for Ext4 inode flags.pfg2014-01-281-2/+2
| | | | | | | | | | | | | The ext4 inode flags do not have equivalents for chflags (1) and hold information that is private to the implementation. The i_flag field in the inode is a better place to hold the Ext4 inode flags as it saves us from masking flags while setting or getting attributes. It should also make things cleaner if we implement write support for Ext4. Suggested by: bde Tested by: Mike Ma MFC after: 3 days
* ext2fs: fix a bug in dirindex and re-enable.pfg2014-01-241-2/+0
| | | | | | | | | | | | The IN_* flags should be set in i_flag instead of corrupting i_flags [1]. Re-enable HTree dirindex as the last series of bug fixes seems to have fixed the issues. Reported by: bde [1] Tested by: kevlo MFC after: 1 week
* ext2fs: Translate the EXT4_EXTENTS and EXT4_INDEX to the inode flags.pfg2014-01-211-2/+2
| | | | | | | | | | | | | | r260545 cleared the inode flags to fix corruption problems but we still need to pass some EXT4 flags for the ext4 read-only mode. None of these attributes has an equivalent in FreeBSD and are uninteresting for the system utilities so they should be innaccessible in ext2_getattrib(). Note: we also use EXT4_HUGE_FILE but we use it directly from the dinode structure so it is not necessary to translate it, Suggested by: bde MFC after: 3 days
* ext2fs: temporarily disable htree directory index.pfg2013-09-071-0/+2
| | | | | | | | | | | | Our code does not consider yet the case of hash collisions. This is a rather annoying situation where two or more files that happen to have the same hash value will not appear accessible. The situation is not difficult to work-around but given that things will just work without enabling htree we will save possible embarrassments for the next release. Reported by: Kevin Lo
* Fix some typos.pfg2013-07-071-3/+3
| | | | MFC after: 1 week
* Initial implementation of the HTree directory index.pfg2013-07-061-0/+899
This is a port of NetBSD's GSoC 2012 Ext3 HTree directory indexing by Vyacheslav Matyushin. It was cleaned up and enhanced for FreeBSD by Zheng Liu (lz@). This is an excellent example of work shared among different projects: Vyacheslav was able to look at an early prototype from Zheng Liu who was also able to check the code from Haiku (with permission). As in linux, the feature is not available by default and must be enabled explicitly with tune2fs. We still do not support the workarounds required in readdir for NFS. Submitted by: Zheng Liu Tested by: Mike Ma Sponsored by: Google Inc. MFC after: 1 week
OpenPOWER on IntegriCloud