Conversation
pid_t and int should both be 4 bytes on most systems, but one's more obvious than the other.
|
@chrisd8088 fyi, this now has the part of work I talked about earlier (viz. 453409f, which removes VFS API-related things). Tests all pass and I think I did it right, but a once-over from you wouldn't go amiss, esp. in the testing machinery. |
chrisd8088
left a comment
There was a problem hiding this comment.
So lovely to see this shrinking things down and making such a clean line between the two projects. Thank you, @kivikakk!
include/config.h.in~
Outdated
| @@ -0,0 +1,103 @@ | |||
| /* include/config.h.in. Generated from configure.ac by autoheader. */ | |||
There was a problem hiding this comment.
I think this file was included as an addition in the commit by accident.
(As a sidebar, I initially considered putting *~ into .gitignore because I'm a vim user and it sometimes leaves these backup files lying around. But then somewhere I think I read advice to not put in your personal stuff in there, so I left it out. However, since the Linux kernel happily puts *~ in theirs, I think we'd be in good company if we wanted to add it. :-)
There was a problem hiding this comment.
Very much so! I don't have such an ignore rule because I always configure my editors not to leave that junk lying around -- I think some part of autotools is producing this particular one, since it keeps coming back.
(I have a ~/.gitignore where I put stuff like .*.sw? (because vim) -- set excludesfile under [core] in your ~/.gitconfig to /home/xyzzy/.gitignore and it'll apply all the time!)
There was a problem hiding this comment.
Yeah, looking at my own ~/.gitignore I see I've already got it ignoring Vim's .*.swp backups, so this must indeed come out of autotools. Sigh.
| t703-vfs-event-null.t \ | ||
| t704-vfs-event-allow.t | ||
| else !ENABLE_VFSAPI | ||
| SKIP_TESTS = t[5-9]?? |
There was a problem hiding this comment.
Because we don't need to skip any VFS-related tests when --enable-vfs-api is not given, I'm pretty sure there's a line below this which can be removed (and the indentation changed), from:
PROJFS_SKIP_TESTS="$(SKIP_TESTS) $$PROJFS_SKIP_TESTS" \
$(PROVE) --exec $(SHELL) \
$(PROJFS_PROVE_OPTS) $$prove_dir; \
to:
$(PROVE) --exec $(SHELL) \
$(PROJFS_PROVE_OPTS) $$prove_dir; \
lib/projfs.c
Outdated
| ssize_t res = write(fd, bytes, count); | ||
| if (res == -1) | ||
| return errno; | ||
| bytes = (void *)(((uintptr_t)bytes) + res); |
There was a problem hiding this comment.
Normal precedence should, I think, let you just do (void *)((uintptr_t)bytes + res), but I'm also wondering if it's slightly more readable to use (char*)bytes + res, which should be equivalent since sizeof(char) == 1 in C.
There was a problem hiding this comment.
Just watched s2.e5 Saints of Imperfection! Major spoilers!
| AC_TYPE_SIZE_T | ||
| AC_TYPE_UINT64_T | ||
|
|
||
| # TODO: for VFS API but can't be conditional; remove if VFS API migrated |
There was a problem hiding this comment.
Yay! Lovely to see this gone! 🙇
| To build libprojfs with the VFSForGit API option (which is | ||
| required if you plan to run a VFSForGit "provider" such as MirrorProvider, | ||
| the test provider we are developing against for now), add the | ||
| `--enable-vfs-api` flag to the arguments for `configure`: |
There was a problem hiding this comment.
Things are definitely getting tidier! 😄
| event_msg_head="$event_msg_head, $4" | ||
| fi | ||
| event_msg_head="$event_msg_head: $code, " | ||
| event_msg_tail="" |
There was a problem hiding this comment.
So much simpler and nicer!
Without the VFS API code, there is no longer a need to customize the regular expression used to match symbol names for export in our libtool invocation.
|
Hey @kivikakk -- I added a couple of cleanups to this branch which fall out of the VFS API removal. Hope they look OK! And I also made a follow-on PR #54 which I think can be merged into this one, which simplifies the library by removing the And there's a now further PR #55 which should first be merged into #54, if it looks OK to you! |
During the initial work on projection and while we had the VFS API in this library, I envisioned a need for the VFS code to call an internal, common function to make a directory (either projected, or normal). That need never materialized, so we can eliminate this function entirely.
Without any shared code between the primary library and a VFS API, there's no need for an internal header file at the moment, so we can eliminate it.
As there is no compelling reason not to allow libprojfs callers to specify the permission mode bits of a projected directory, we can support this in our API, and defer to our callers (VFSForGit in particular) to supply the directory permissions they expect or require.
allow arbitrary permission modes on projected dirs
|
Nice! All looking good to me 😻 |
Remove internal header file

With these changes, the VFS API in C# (at
github/VFSForGit#2microsoft/VFSForGit#848) can be used.