User Details
- User Since
- Oct 24 2014, 7:17 PM (496 w, 15 h)
Mar 17 2024
In general b_lblkno is for the use of the client of the buffer cache to use for whatever purpose they want. The b_blkno is what the underlying hardware is going to use to locate the requested data. The filesystem generally uses its BMAP routine to convert the b_lblkno to the appropriate b_blkno.
Mar 11 2024
Mar 5 2024
Feb 28 2024
Relevant parts of these changes were incorporated in commit 772430dd6795585 as discussed in PR 267654 and review https://reviews.freebsd.org/D41724.
Feb 20 2024
This does fix the problem as described in the summary.
If I understand your change, you are coming up with a different synthetic inode value to ensure that it will be unique. Presumably this value is externally visible as the "st_ino" in the stat structure and the "d_fileno" in the dirent structure. If so, this value will be different after this change so any program that has saved it somewhere could get confused. Not sure if this is really an issue though.
Feb 17 2024
Non-obvious bug, but once figured out the fix is simple and clearly correct.
Dec 17 2023
Dec 4 2023
Dec 3 2023
I would be happy to review a subsequent patch to make i_nlink a 16-bit unsigned int and move/adapt the KASSERT() checking for underflow.
Nov 28 2023
Change in-memory i_nlink to a signed 32-bit value so that can check that it has not gone negative before assigning it to the on-disk unsigned 16-bit di_nlink field.
Nov 25 2023
Nov 17 2023
Per kib suggestions:
Nov 15 2023
Comments from kib.
Nov 12 2023
Oct 28 2023
Oct 25 2023
Oct 20 2023
Oct 18 2023
Sorry, I thought I had approved this and missed your (useful) update.
Sep 8 2023
Updates reflecting comments from kib.
I do not know which if any disk controllers are currently affected. It is a problem that comes and goes. Adding the alignment hook allows buffer alignment to be easily adjusted as needed. It also has the performance improvement of not requiring disk drivers to use bounce buffers in cases that they previously needed to do so.
Updates reflecting comments from kib and imp.
Sep 6 2023
This all looks good to go. Thanks for doing it.
Sep 5 2023
Update to reflect suggested changes by kib.
Sep 2 2023
Your checksum test is a good way to verify that everything worked as expected though it is possible that some sort of filesystem corruption snuck in (obviously to both copies). So you might want to add a second check by running 'fsck -p -f' on the both the gunion filesystem and the original filesystem after the gunion has been dissolved. The exit status from fsck should be zero.
I am happy to see a set of gunion tests being added. The set of tests looks complete.
Aug 20 2023
Aug 12 2023
Aug 11 2023
Aug 10 2023
This looks like the correct solution to me. We are at the point where we decide we need to do a forcible unmount and realize that we are about to do it on the root filesystem.
Aug 9 2023
Aug 7 2023
Aug 6 2023
Aug 5 2023
Aug 1 2023
Jul 27 2023
Jul 26 2023
Jul 25 2023
Jul 22 2023
Jul 18 2023
Jun 13 2023
Jun 7 2023
May 30 2023
For system calls you do need annotations, you cannot properly understand the purpose of any pointer passed to syscall otherwise. Is it in, out, in/out, or even just an abstract address like mmap/munmap/madvise arguments?
For ioctls, the meaning of the command/arg is quite formalized, at least in BSDs. You are well aware that we encode both sizes and directions for copyin and copyout. After I took some time thinking how to implement what you described, I was surprised by the statement that syscalls are easier than ioctls.
That said, I am quite dislike extending the syscall semantical coverage by adding one-off operations. In the case of special fds, having all ops grouped together (under ioctl umbrella) localizes the interfaces and make them more comprehensive. This is, of course, my opinion, but all my experience supports the claim.