PR: 252106
Submitted By: pitwuu at gmail.com
Details
- Reviewers
manu dchagin - Group Reviewers
Linux Emulation - Commits
- rGb630d64c3da1: linux: implement statx(2)
rG2362ad457a01: linux: implement statx(2)
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/compat/linux/linux.h | ||
---|---|---|
217 | Looks like Linux does not have (dropped?) _DIR, just `STATX_ATTR_AUTOMOUNT` | |
237 | this is stx_attributes_mask | |
246 | uint64_t stx_mnt_id uint64_t spare uint64_t spare[12] | |
sys/compat/linux/linux_stats.c | ||
204 | for what it's worth memset(&x, 0, sizeof(x)) is slightly more common in kernel now than bzero(&x, sizeof(x)) |
(Note to self: fails tinderbox, probably depends on https://reviews.freebsd.org/D30193)
sys/compat/linux/linux.h | ||
---|---|---|
217 | Thanks! Somehow it didn't occur to me to compare the struct layout. |
sys/compat/linux/linux_stats.c | ||
---|---|---|
204 |
In this file it's mostly bzero(), though. I think we should leave it as it is, for consistency. |
sys/compat/linux/linux_stats.c | ||
---|---|---|
776 | small optimisatio: may be mask alredy known flags? to see which is bit is unsupported? |
sys/compat/linux/linux_stats.c | ||
---|---|---|
776 | indeed a minor point, but the message reads as if it implies the printed flags are all unsupported so I think it makes sense to either mask the known flags or make the message something like "statx flags 0x%x includes unsupported flags" |
sys/compat/linux/linux_stats.c | ||
---|---|---|
776 | I like the idea of masking off the recognized flags, leaving just the unrecognized ones. However, I'd prefer to do it in a followup commit, as we have at least a dozen places which do that, and I think it's better to fix them together. |
I like the idea of masking off the recognized flags ... in a followup commit
Sounds good to me
sys/compat/linux/linux_stats.c | ||
---|---|---|
776 | agree, Im asking as glibc-2.32 statx test fails, unsupported flags are: 0x2000 and 0x4000 |
sys/compat/linux/linux_stats.c | ||
---|---|---|
776 | For reference, those are AT_STATX_FORCE_SYNC (0x2000) and AT_STATX_DONT_SYNC (0x4000). AT_STATX_FORCE_SYNC Force the attributes to be synchronized with the server. This may require that a network filesystem perform a data writeback to get the timestamps correct. AT_STATX_DONT_SYNC Don't synchronize anything, but rather just take whatever the system has cached if possible. This may mean that the information returned is approximate, but, on a network filesystem, it may not involve a round trip to the server - even if no lease is held. |