summaryrefslogtreecommitdiffstats
path: root/sys/fs/ext2fs/ext2_inode_cnv.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r310705, r310706:pfg2017-01-041-25/+26
| | | | | | style(9) cleanups. Just to reduce some of the issues found with indent(1).
* Revert r294695:pfg2016-02-031-5/+7
| | | | | | | | | | ext2fs: passthrough any extra timestamps to the dinode struct. While it passed the classic testing, the change appears to have caused some regression and still requires some more precautions. PR: 206820 MFC after: 3 days
* ext2fs: passthrough any extra timestamps to the dinode struct.pfg2016-01-241-7/+5
| | | | | | | | | | | | | In general we don't trust any of the extended timestamps unless the EXT2F_ROCOMPAT_EXTRA_ISIZE feature is set. However, in the case where we freshly allocated a new inode the information is valid and it is better to pass it along instead of leaving the value undefined. This should have no practical effect but should reduce the amount of garbage if EXT2F_ROCOMPAT_EXTRA_ISIZE is set, like in cases where the filesystem is converted from ext3 to ext4. MFC after: 4 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.
* ifdef ext2_print_inode which is not really used.pfg2014-11-121-0/+2
| | | | | | | | | ext2_print_inode is not really used but it was nice to have for initial development work. #ifdef it under a new EXT2FS_DEBUG knob so that we don't spend time compiling it. 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/+4
| | | | | | | | | | | | | 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: Translate the EXT4_EXTENTS and EXT4_INDEX to the inode flags.pfg2014-01-211-0/+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: fix inode flag conversion.pfg2014-01-111-2/+2
| | | | | | | | | | | | | | | | | | After r252890 we are naively attempting to pass through the inode flags. This is technically incorrect as the ext2 inode flags don't match the UFS/system values used in FreeBSD and a clean conversion is needed. Some filtering was left in place so the change didn't cause significant changes in FreeBSD but some of the garbage passed is likely to be the cause for warning messages in linux. Fix the issue by resetting the flags before conversion as was done previously. This also means we will not pass the EXT4_* inode flags into FreeBSD's inode. PR: kern/185448 MFC after: 3 days
* Add read-only support for extents in ext2fs.pfg2013-08-121-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Initial implementation of the HTree directory index.pfg2013-07-061-2/+1
| | | | | | | | | | | | | | | | | | | 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
* ext2fs: space vs tab.pfg2013-06-031-1/+1
| | | | | Obtained from: Christoph Mallon MFC after: 3 days
* ext2fs: Use prototype declarations for function definitionspfg2013-02-101-8/+3
| | | | | Submitted by: Christoph Mallon MFC after: 2 weeks
* More constant renaming in preparation for newer features.pfg2012-12-201-2/+3
| | | | | | | | | | | | | | | We also try to make better use of the fs flags instead of trying adapt the code according to the fs structures. In the case of subsecond timestamps and birthtime we now check that the feature is explicitly enabled: previously we only checked that the reserved space was available and silently wrote them. This approach is much safer, especially if the filesystem happens to use embedded inodes or support EAs. Discussed with: Zheng Liu MFC after: 5 days
* Fix up kernel sources to be ready for a 64-bit ino_t.mdf2012-09-271-1/+1
| | | | Original code by: Gleb Kurtsou
* Add support for ns timestamps and birthtime to the ext2/3 driver.pfg2012-03-081-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When using big inodes there is sufficient space in ext3 to keep extra resolution and birthtime (creation) timestamps. The appropriate fields in the on-disk inode have been approved for a long time but support for this in ext3 has not been widely distributed. In preparation for ext4 most linux distributions have enabled by default such bigger inodes and some people use nanosecond timestamps in ext3. We now support those when the inode is big enough and while we do recognize the EXT4F_ROCOMPAT_EXTRA_ISIZE, we maintain the extra timestamps even when they are not used. An additional note by Bruce Evans: We blindly accept unrepresentable tv_nsec in VOP_SETATTR(), but all file systems have always done that. When POSIX gets around to specifying the behaviour, it will probably require certain rounding to the fs's resolution and not rejecting the request. This unfortunately means that syscalls that set times can't really tell if they succeeded without reading back the times using stat() or similar and checking that they were set close enough. Reviewed by: bde Approved by: jhb (mentor) MFC after: 2 weeks
* Bring in the ext2fs work done by Aditya Sarawgi during and after Google Summerlulf2010-01-141-0/+138
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