8000 Prevent hardlinking attempt if it will exceed the filesystem maximum · Issue #26 · akaihola/hardlinkpy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Prevent hardlinking attempt if it will exceed the filesystem maximum #26
Open
@chadnetzer

Description

@chadnetzer

This was an issue (14) from JohnVillalovos's Google Code repo (brought over to Github), and an issue addressed by @wolfospealain in his PR #3.

The benefit of doing this would be avoiding repeatedly attempting a link and having to unwind when it fails. However, we also want to avoid repeatedly inquiring about the maximum allowed link for a given file.

It should be easy to keep a dictionary for each new st_dev encountered, that queries the maximum links allowed for that device, and using it to avoid linking if the maximum is reached. If a file has reached the maximum allowed links, it may also be beneficial to remove it from consideration for future linking, and allow another equivalent file with less than the maximum to be linked to.

This may seem like overkill, but the maximum nlinks for many common file systems is no more than a 15 or 16 bit number, and there may be reasonable use cases for hardlinkpy that hit that limit.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0