FreeBSD ( -current) now has 64bit inodes reddit / BSD ---------------------------------------------------------------------- lannibal_hecter · 2017-05-28 02:20 Minimal background information: Objects on a file system (directories, files,..) are described by a data structure called inode. So far, values which identify inodes were limited to 32bit on FreeBSD while many modern file systems use 64bit identifiers. The 64-bit inodes project now has been committed. This should get rid of some limitations like files per file system (4 billion with 32bit inodes), max path length etc and make FreeBSD's file system internals more compatible to DragonflyBSD and Linux which could make it easier to port certain file systems and applications to FreeBSD. Regarding ABI breakage: > ABI breakage is mitigated by providing compatibility using versioned symbols, ingenious use of the existing padding in structures, and by employing other tricks. Unfortunately, not everything can be fixed, especially outside the base system. For instance, third-party APIs which pass struct stat around are broken in backward and forward incompatible ways. Advice for users who follow -current: > Update note: strictly follow the instructions in UPDATING. Build and install the new kernel with COMPAT_FREEBSD11 option enabled, then reboot, and only then install new world. https://svnweb.freebsd.org/base?view=revision&revision=318736 Interestingly, in "The Design and Implementation of the FreeBSD operating system", originally published in 1996, the authors predicted: > If we assume that the growth rate in the number of files per file system over the last 20 years will continue at the same rate, we estimate that the 32-bit inode number should be **enough for another 10 to 20 years**. Pretty good prediction. ---------------------------------------------------------------------- shitty_po · 2017-05-28 02:48 [Hmm...](https://github.com/NetBSD/src/commit/6b43cf6bbb29e56c859b6d4d 73291c8e475e088c) ---------------------------------------------------------------------- celibidaque · 2017-05-28 07:15 christos, the savior of the file system's future! Committing to 64-bit, he saved our files files for eons to come! ---------------------------------------------------------------------- crest_ · 2017-05-28 11:34 The fallout of this in ports should be interesting... ---------------------------------------------------------------------- Vulphere · 2017-05-28 11:38 Interesting... ---------------------------------------------------------------------- daemonpenguin · 2017-05-28 12:04 There probably shouldn't be many ports which care one way or the other how the file system is implemented. Changing inode implementation shouldn't matter to a port any more than running on UFS vs ext4. ---------------------------------------------------------------------- crest_ · 2017-05-28 12:25 It does, because inode numbers used to be sizeof(int) now that they are larger than sizeof(int) they can be truncated to int and lots of code treats the inode number and device number as unqiue enough to identify a file. If the inode number gets truncated you end up with interesting bugs e.g. software dedupliating random files. ---------------------------------------------------------------------- brynet · 2017-05-28 13:24 OpenBSD also made this change during the 64-bit time_t ABI break, it should be noted that this only adjusts the VFS layer type, but not individual filesystems. UFS is still limited to 32-bit inode numbers, a lot of people are confused by this.. http://marc.info/?l=openbsd-cvs&m=137637321205010&w=2 http://marc.info/?l=openbsd-cvs&m=136994156208407&w=2 FreeBSD is no different.. https://svnweb.freebsd.org/base/head/lib/libufs/libufs.h?r1=318736&r2= 318735&pathrev=318736 ---------------------------------------------------------------------- BumpitySnook · 2017-05-28 21:40 > lots of code treats the inode number and device number as unqiue enough to identify a file I'm not sure this pattern is all that common. Especially combined with the mistake of representing `ino_t` as int. But we'll see! ---------------------------------------------------------------------- dlangille · 2017-05-28 22:16 > It does, because inode numbers used to be sizeof(int) now that they are larger than sizeof(int) I am sure you can do sizeof(the type name it actually is). Am I mistaken? ---------------------------------------------------------------------- rootwyrm · 2017-05-29 00:07 #DANGER WILL ROBINSON, DANGER. **Do NOT pull up to ino64 on aarch64 yet.** In fact, don't plan on doing it any time soon. I found a lovely regression in libarchive last night. But no big. I mean, it's not like having a world-writable `/usr/local/bin/bash`is dangerous, right? This is super-badness if you are using pkgbase, for obvious reasons. Edit: the relevant commit to stop before is r318898. (Yes, RaspBSD is aware of the borkage.) If you want to observe the chaos from a safe distance, it's [bug #219606](https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219606). ---------------------------------------------------------------------- rootwyrm · 2017-05-29 00:21 Uh, FYI, that would be news to a whole lotta people since 64-bit inode capability was technically ready with the first release of UFS2. So that's only, uh, anybody remember when FreeBSD 5.0 was released again? That long. The reason it's set to uint32 is because of, as mentioned, ABI compat. Hooray legacy! In order to not break old UFS1 or put users through hell, it was just left at 32-bit. See _The Design and Implementation of the FreeBSD Operating System_, pp 445-448. Besides, the really fun carnage is lurking in NFS. Don't know what I'm talking about? Don't worry... it'll rear it's head when you least expect it, but only when it can do the most damage. :P ---------------------------------------------------------------------- rootwyrm · 2017-05-29 01:41 I think that's *chris tos* not *christ os*. chris tos, come to save you from clicking 'I accept' for eons to come. ;) ---------------------------------------------------------------------- brynet · 2017-05-29 03:14 UFS2/FFS2 didn't introduce 64-bit inode numbers, it introduced 64-bit block pointers. ---------------------------------------------------------------------- brynet · 2017-05-29 03:31 Page 445, as you referenced: "The UFS1 filesystem uses 32-bit inode numbers. *While it is tempting to increase these inode numbers to 64-bit in UFS2, doing so would require the directory format be changed.*" That change has **not** taken place. As it would break more than just ABI. ---------------------------------------------------------------------- rootwyrm · 2017-05-29 03:39 Nope; UFS2 technically is capable of both. However, 64-bit inodes weren't *implemented* due to the issues it would cause. But it's not like Marshall Kirk McKusick would know anything about the design or implementation of UFS, right? /s I *strongly* recommend you read the citations before speaking in the future. ---------------------------------------------------------------------- brynet · 2017-05-29 04:11 I assure you, I did read it. As the rest of the quoted paragraph goes on to explain, by mckusick, that "changing the directory formats would entail creating many filesystem specific functions that would increase complexity and maintainability issues with the code." The same paragraph even mentions the at the time limitation of 32-bit inode numbers at the VFS layer. There is no further mention in regards to 64-bit inode number extensibility in FFS2. I *strongly* recommend you don't make assumptions about people, speaking as an OpenBSD developer. ---------------------------------------------------------------------- crest_ · 2017-05-29 08:39 The right way of dealing with it is by not casting ino_t (implicitly) to int. ---------------------------------------------------------------------- daemonpenguin · 2017-05-29 16:45 But most ports don't deal with inode numbers, or care what an inode is. That's why I don't see this as likely to affect ports. Apart from a few utilities that specifically work with file systems, very few ports should care one way or the other about inodes. ---------------------------------------------------------------------- ben_bai · 2017-05-29 21:43 Speaking of 64-bit time_t. OpenBSDs FFS timestamps will wrap around in 2038. FFS2 is safe. Why is FFS2 only the default for >1TB file systems? ---------------------------------------------------------------------- brynet · 2017-05-29 23:12 It likely just needs more testing, and for someone to do the work. I think there are issues with metadata space overhead, and growing ffs2. It's also a bit hard to tell everyone to recreate their filesystems and restore from backup.. Fortunately there's a bit more time for filesystem timestamps, those tend to be much closer to the current date. ---------------------------------------------------------------------- crest_ · 2017-05-30 08:26 If everything failed cleanly it would be boring, but other operating systems have probably triggered most of these bugs before FreeBSD. ---------------------------------------------------------------------- antiduh · 2017-07-07 05:33 I uh, really don't see the problem. It looks like every bit of trouble in that bug you made for yourself. If you don't want weird, unexpected behavior, don't go meddling around with versioned library symlinks. The fact that 64-bit inodes are in has nothing to do with the fact that la.so was upgraded to v7. If you have built packages that depends on la.so.6, rebuild them against 7 and move on with your life. If you don't want them to break, then don't get rid of 6 until you've rebuilt. The old library will stick around until you delete it via `make delete-old-libs`. This is standard versioned library stuff. Edit: Lol, so you just downvote me. You really are all bark and no bite.