Skip to content

Add flush command to ipfs files#2196

Merged
whyrusleeping merged 9 commits intomasterfrom
feat/mfs-flush-cmd
Feb 9, 2016
Merged

Add flush command to ipfs files#2196
whyrusleeping merged 9 commits intomasterfrom
feat/mfs-flush-cmd

Conversation

@whyrusleeping
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this notation is a bit hard to read and error prone. i think these may be better:

nd.Blockstore.PinLk.Lock()
defer nd.Blockstore.PinLk.Unlock()
// or
defer nd.Blockstore.PinLock().Unlock()

@jbenet
Copy link
Copy Markdown
Member

jbenet commented Jan 23, 2016

@whyrusleeping this looks good. is it safe ?

@whyrusleeping
Copy link
Copy Markdown
Member Author

@jbenet its too safe. I need to remove the pinning.

@jbenet
Copy link
Copy Markdown
Member

jbenet commented Jan 23, 2016

its too safe. I need to remove the pinning.

ahhaahah

@jbenet
Copy link
Copy Markdown
Member

jbenet commented Jan 23, 2016

@whyrusleeping whyrusleeping self-assigned this Jan 29, 2016
@whyrusleeping whyrusleeping force-pushed the feat/mfs-flush-cmd branch 3 times, most recently from f02c5eb to 49e72d5 Compare February 4, 2016 07:08
@whyrusleeping
Copy link
Copy Markdown
Member Author

alright, this is ready. most of the review is needed on the last commit, i ripped the mfs file apart into an 'inode' type object, and a 'file descriptor' type object. This makes working with file things much easier, and i've been meaning to do it for a long time. Things should be a little more performant, way more threadsafe, the files api stuff shouldnt hang for @diasdavid, and fuse should be much happier in general.

@Kubuxu
Copy link
Copy Markdown
Member

Kubuxu commented Feb 4, 2016

From command info I can see that it causes changes not to be flushed to disk. Wouldn't it be better to call it --no-flush?

@whyrusleeping
Copy link
Copy Markdown
Member Author

@Kubuxu the default is that changes are flushed to disk. the existing --flush command defaults (when not specified) to true. If you want to not flush changes to disk, you specify --flush=false

@Kubuxu
Copy link
Copy Markdown
Member

Kubuxu commented Feb 4, 2016

Ahh, ok. Sorry for that.

@whyrusleeping
Copy link
Copy Markdown
Member Author

@Kubuxu no worries, must be a documentation issue, what can i change to make that more clear?

@Kubuxu
Copy link
Copy Markdown
Member

Kubuxu commented Feb 4, 2016

Just this wording is unfortunate. It suggests that just --flush is unsafe.

@whyrusleeping
Copy link
Copy Markdown
Member Author

@Kubuxu there, that seems a little less confusing to me

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
…them

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
@whyrusleeping
Copy link
Copy Markdown
Member Author

@RichardLitt adding 'ipfs files flush' in this PR.

whyrusleeping added a commit that referenced this pull request Feb 9, 2016
Add flush command to ipfs files
@whyrusleeping whyrusleeping merged commit 37258a2 into master Feb 9, 2016
@whyrusleeping whyrusleeping deleted the feat/mfs-flush-cmd branch February 9, 2016 00:10
@RichardLitt
Copy link
Copy Markdown
Member

Thanks @whyrusleeping. Noted in ipfs-inactive/http-api-spec#57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants