[webkit-reviews] review granted: [Bug 225767] Introduce FileSystem::hardLinkCount() : [Attachment 428530] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu May 13 12:09:23 PDT 2021
Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 225767: Introduce FileSystem::hardLinkCount()
https://bugs.webkit.org/show_bug.cgi?id=225767
Attachment 428530: Patch
https://bugs.webkit.org/attachment.cgi?id=428530&action=review
--- Comment #5 from Darin Adler <darin at apple.com> ---
Comment on attachment 428530
--> https://bugs.webkit.org/attachment.cgi?id=428530
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=428530&action=review
> Source/WTF/wtf/FileSystem.h:172
> +WTF_EXPORT_PRIVATE Optional<uint64_t> hardLinkCount(const String& path);
We could consider in future using Expected instead of Optional here if callers
might need to know what specific error occurred.
> Source/WebKit/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:71
> + if (linkCount && *linkCount == 1)
> + FileSystem::deleteFile(path);
Does this single failure of hardLinkCount orphan a file forever and mean it
will never get cleaned up? Obviously not new to this refactoring.
More information about the webkit-reviews
mailing list