HackMD
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
filesystemmmmms =============== :::info Major loci of choices --------------------- - metadata: in-tree or side-tree - attributes: how many, what are they - functional focus: filters - chunking? - dev nodes: wtf? sakurity? ::: And, one very big, core note: **you can design an archival filesystem, or a filesystem for getting things done -- and not both**. trees, trees everywhere ----------------------- ### Metadata in-tree - happy: the more 'obvious' choice - sad: changes in attribs on leaf nodes may cause a lot of parent notes to diverge in hash. - theory might say "that's log/height", but practice seems to indicate chown hits swaths and that causes *all* intermediate nodes to update, which means roughly 1/2 all nodes diverge. - sad: recursive fetch of all notes gets metadata and data -- heavy if you only wanted the metadata. - debatable: IPLD Selectors can get you this anyway (it's just less smackingly obvious). ### Metadata in parallel tree - happy: Easier to fetch a tree of **just** the metadata. - debatable: IPLD Selectors can get you this anyway (it's just less smackingly obvious). - still, definitely makes it more obvious how to map this onto other transport/packing formats, anyway. - imagine 'car' formats: of course you put a full tree in them. - misleadingly seems happy: can dedup the full-content-body bytes more easily since metadata is separate. - absolutely misleading. the leafs will dedup in IPLD no matter what. (not a _bad_ thing -- just not a good thing unique to this approach.) ### flatstitch root tree - e.g. `[{"name":"x","type":"dir"},{"name":"x/y","type":"file"},...]` - sad: they don't trivially compose and scale. - makes 'root' special and that's awkward. - happy: most updates to attribs on a leaf will change that leaf and the 'root' and nothing else. - debatable: just how consequential this is in practice. ### variations on in-tree Is it useful to put attribs (other than name) in their own block, so when they're the same, the CID is simply the same? Also makes attribs "fixed size" which might be useful (but names still aren't, so, eh). attribyooots ------------ How many different ways to do attributes *are* there? ### one ``` type Attribs struct { mtime Int posix Int # Ye standard 0777 mask packing here? sticky Bool (implicit: false) setuid Bool (implicit: false) setgid Bool (implicit: false) uid Int gid Int } ``` ### two ``` type Attribs struct { mtime Int posix Int # Ye standard 0777 mask packing here? sticky Bool (implicit: false) } ``` - diff vs one: actively disregards / no-support-for uid and gid. ### three ``` type Attribs struct { mtime optional Int } ``` - questionable: would one ever really want a tree with mixtures of mtime and not? what does absent mean? what would cause one to produce such a mixed tree? ### four ``` type Attribs struct { } ``` - worth pointing out: this is absolutely an option. ### five ``` type Attribs struct { mtime Int posix Int # Ye standard 0777 mask packing here? sticky Bool (implicit: false) uid Int gid Int } ``` - diff vs one: we can still describe owner uid and gid, but setuid and setgid are excluded from the schema entirely. Thus, perhaps you might use this schema when you know you're not going to accept inputs with those properties. - this set of attributes might also make the most sense with a schema for the tree that also doesn't support describing device nodes, etc, per that same user story about intentionally low-priv/low-effect(? wording) modes. ### more... ### notes on attributes - 'ctime' exists. But you can't set it without being a driver. So this is one of those things that's "archival, or fit-for-purpose"-choice. - 'btime' is a new, recently added property! wow! but it's the same issue as 'ctime'. - 'xattrs' are unbounded in size. that's cool. - 'xattrs' are not all equally writeable (see "`security.*`"). So this prompts "archival, or fit-for-purpose" again. - 'xattrs' are not all *readable* unconditionally(!??!)! - some are not readable without privileges... - some actually get string-munged on write in a form of "namespacing"... - hardlinks exist but most people agree that preserving that is a mistake. - hardlinks are for a system's local optimizations of storage dedup and should not be used for semantics. chunking -------- ### chunking vs external integration Basically: chunking is Good. Except: people like using basic-bitch hashes on per-file granularity because it's easier for everyone to agree on. What do? (Not clear there's actually anything great possible here period.) ### which chunking to use? Rolling checksums are the name of the game. There are several of these. Correctly implemented rolling checksums for chunkfinding should be very very fast, nearly invisible in performance compared to cryptographic hashing. Update: some buzhash based things have been pushed into go-ipfs-chunker! Probably we should use them. dev nodes: seriously, argh -------------------------- - clearly need 'em for some root filesystem and container-related work - they're opaque ints -- that's "easy" enough - but some of those opaque ints are more consistently meaningful than others - device loop nodes are effectively pointers to global vars in the kernel, for example: so they're meaningless to transport anywhere else. But surely it would be inappropriate for our understanding of posixy filesystems to take note of this! nngh. misc references --------------- - https://www.cyphar.com/blog/post/20190121-ociv2-images-i-tar - the entire thing. Just read the entire thing. - `casync` has a (overly?) comprehensive list of things you could conceivably save metadata on: https://github.com/systemd/casync/blob/e4a3c5efc8f11e0e99f8cc97bd417665d92b40a9/src/caformat.h#L82-L125 - Timeless Stack `rio` has a bunch of code around filesystem attribute normalizers which is the result of some real-world user stories discovery around needing to hash things deterministically+convergently while handling full container filesystems: https://github.com/polydawn/go-timeless-api/blob/0ece408663edb9dbc6109ef8690f8425f0d8f5f4/filesetFilters.go - especially take a gander at the preset groups that ended up getting used in different user stories: https://github.com/polydawn/go-timeless-api/blob/0ece408663edb9dbc6109ef8690f8425f0d8f5f4/filesetFilters.go#L32-L40 - *We will probably have filters like this in IPFS for **all** future paths of development, for any and all of the above choice matrices.* Anything we do that's not exactly posix -> there will be filters/mappings. Know 'em. perhaps a summary ----------------- 1. There are definitely more than one meaningful filesystem spec possible. Let's do several. - We are uniquely empowered to do this and support it well and share dedup. We can rock; Therefore, we should rock. 2. Probably "containerfs" is a big one; "plainfiles" might be another; "posixlowpower" a third? - This is an example enumeration mapping onto user stories, but might not be correct. Figuring out which of these (or which not-listed-here combinations) we actually want to focus on is still the name of the problem -- we've done discovery in this document, not made choices yet. 3. Decisions about the overall tree topology should be made *now*. All three (or more) filesystem specs should share the topology. - Variations in the attributes are fine; variations in the topology are extremely undesirable. (Concretely: We want the same selectors to work on all of the filesystem formats!)

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully