Jump to content

  1. 0
  2. 0
  3. 0/5

Rate this Topic

- - - - -

What's Fsync?

  • Please log in to reply

OP monky_1

monky_1

Android Apprentice

  • 296 posts

Posted 25 June 2012 - 06:38 PM #1

What the hell is it? Do I save more battery life if it is enabled?
  • 0 Likes

nativi

nativi

Android Addict

Posted 25 June 2012 - 06:45 PM #2

Facebook sync??? I don't know but I like to find out!

Sent from my Galaxy Nexus using Tapatalk 2
  • 0 Likes

OP monky_1

monky_1

Android Apprentice

  • 296 posts

Posted 25 June 2012 - 06:54 PM #3

No its in ICS kernels some devs have them enabled and some have them disabled. Francisco just enabled it in he's kernel I believe.

Attached Thumbnails

  • uploadfromtaptalk1340679270065.jpg

  • 1 Likes

JkdJEdi

JkdJEdi

Android Enthusiast

Posted 25 June 2012 - 07:01 PM #4

No its in ICS kernels some devs have them enabled and some have them disabled. Francisco just enabled it in he's kernel I believe.

He mentioned a "Security Fix" on his last update, this might have been it. Just did a quick GOOGLE and now I'm more convinced that it was the security fix

File Synchronizing between PC and your phone, file browsing and working with FTP has never been easier. FSync (Beta) is a file synchronizer, browser and an FTP client for Android powered phones. It manages several FTP servers, supports FTPS - FTP over TLS/SSL in active and passive mode and securely stores user Credentials.




And a more info that you'll ever want to read....


Android will do the sync when it needs to -- such as when the screen turns off, shutting down the device, etc. If you are just looking at "normal" operation, explicit sync by applications is never needed.
The problem comes when the user pulls the battery out of their device (or does a hard reset of the kernel), and you want to ensure you don't lose any data.
So the first thing to realize: the issue is when power is suddenly lost, so a clean shutdown can not happen, and the question of what is going to happen in persistent storage at that point.
If you are just writing a single independent new file, it doesn't really matter what you do. The user could have pulled the battery while you were in the middle of writing, right before you started writing, etc. If you don't sync, it just means there is some longer time from when you are done writing during which pulling the battery will lose the data.
The big concern here is when you want to update a file. In that case, when you next read the file you want to have either the previous contents, or the new contents. You don't want to get something half-way written, or lose the data.
This is often done by writing the data in a new file, and then switching to that from the old file. Prior to ext4 you knew that, once you had finished writing a file, further operations on other files would not go on disk until the ones on that file, so you could safely delete the previous file or otherwise do operations that depend on your new file being fully written.
However now if you write the new file, then delete the old one, and the battery is pulled, when you next boot you may see that the old file is deleted and new file created but the contents of the new file is not complete. By doing the sync, you ensure that the new file is completely written at that point so can do further changes (such as deleting the old file) that depend on that state.

Edited by JkdJEdi, 25 June 2012 - 07:09 PM.

  • 0 Likes
Trust Your TecnoLusT

yarly

yarly

Just a noob that doesn't know what he's talking about

Posted 25 June 2012 - 08:01 PM #5

Francos kernel has fsync disabled by default. It's enabled by default on every other kernel. He finally did give users the option to enable it though as of today. I still think he should add a spot to his thread though telling users about what fsync does and why they would enable/disable it (and how to do that without his app).



He mentioned a "Security Fix" on his last update, this might have been it. Just did a quick GOOGLE and now I'm more convinced that it was the security fix

File Synchronizing between PC and your phone, file browsing and working with FTP has never been easier. FSync (Beta) is a file synchronizer, browser and an FTP client for Android powered phones. It manages several FTP servers, supports FTPS - FTP over TLS/SSL in active and passive mode and securely stores user Credentials.



You sort of have the right idea, but wrong application/process. fsync is a process that happens within any linux kernel (see the git repostory link above for more info). My post about it: http://rootzwiki.com...982#entry749982
  • 0 Likes

creaky24

creaky24

Super User

  • 310 posts

Posted 26 June 2012 - 02:07 AM #6

Thanks, yarly.

Still don't see any place in Franco's app to enable fsync maybe I need to update the kernel from 194.

Sent from my Liquified Nexus
  • 0 Likes

djd338

djd338

Android Lover

  • 131 posts

Posted 26 June 2012 - 03:19 AM #7

I updated to F196 yesterday and have kept the Franco app updated. I also can't find where to enable this. And, I'm still not sure if it's anything I should be concerned about or why it's usually enabled by default, but Franco turns it Off, etc, etc?
  • 0 Likes

abbofro

abbofro

Android Lover

  • 228 posts

Posted 26 June 2012 - 04:13 AM #8

Ezekeels explanation:


Posted Image


Google Galaxy Nexus (GSM)
ROM: AXIOM HYBRYD M2
Kernel: GLaDOS 1.34
  • 0 Likes

yarly

yarly

Just a noob that doesn't know what he's talking about

Posted 26 June 2012 - 09:43 AM #9

I updated to F196 yesterday and have kept the Franco app updated. I also can't find where to enable this. And, I'm still not sure if it's anything I should be concerned about or why it's usually enabled by default, but Franco turns it Off, etc, etc?


Probably not in his app then yet (I don't use his stuff so cannot say).

EDIT: I saw in his change log you can change it if you're on release 196 or later using this command:

echo Y > /sys/module/sync/parameters/fsync_enabled

  • 0 Likes