Opened 13 years ago

Closed 13 years ago

#7433 closed enhancement (fixed)

[BFS FUSE] Improve integration

Reported by: idefix Owned by: axeld
Priority: normal Milestone: R1
Component: File Systems/BFS Version:
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

While the bfs_fuse module currently works on other operating systems, it doesn't integrate well: you have to use the command line to mount and unmount BFS volumes.

The attached patch improves the integration and allows the module to act as a mount-helper. You can then use any method to mount and unmount BFS volumes with the module.

If you are running Ubuntu you can try this out by adding my Personal Package Archive to the software sources list, this article describes the necessary steps. After that you can use the Ubuntu Software Centre or Synaptic Package Manager to install the befs-fuse package.

Attachments (2)

improve_integration.patch (5.5 KB ) - added by idefix 13 years ago.
Improve integration of BFS FUSE module, allowing it to act as a mount-helper
add_check.patch (468 bytes ) - added by idefix 13 years ago.
Check if the mount point is set (implies that device is also set), before trying to mount the volume.

Download all attachments as: .zip

Change History (12)

comment:1 by idefix, 13 years ago

patch: 01

by idefix, 13 years ago

Attachment: improve_integration.patch added

Improve integration of BFS FUSE module, allowing it to act as a mount-helper

comment:2 by axeld, 13 years ago

I have no clue, but that patch looks good to me :-) Unless Ingo objects (in time), I would try to commit this in the next few days.

in reply to:  2 comment:3 by bonefish, 13 years ago

Replying to axeld:

I have no clue, but that patch looks good to me :-)

Same here. :-)

Unless Ingo objects (in time), I would try to commit this in the next few days.

No objections from me.

comment:4 by axeld, 13 years ago

Applied in hrev41258, thanks!

BTW have you already looked into why BFS is mounted with the wrong character set by default under Linux by any chance? I have to pass iocharset=utf8 as parameter when mounting, ie. I need to mount it manually or else it's wrong.

in reply to:  4 ; comment:5 by idefix, 13 years ago

Replying to axeld:

Applied in hrev41258, thanks!

Thanks!

BTW have you already looked into why BFS is mounted with the wrong character set by default under Linux by any chance? I have to pass iocharset=utf8 as parameter when mounting, ie. I need to mount it manually or else it's wrong.

No, I never experienced this issue. But that has probably to do with the limited testing I have done so far. How do you pass that parameter to bfs_fuse? The only threads on the Haiku mailinglists I can find are about mounting with the befs kernel driver, not the bfs_fuse module. If you also have to pass this option to the bfs_fuse module (which wasn't possible before hrev41258), I can add it to the default FUSE options. (How can you tell which character set it is using?)

Next on my todo list is that pesky myfs folder. I'm currently writing an email to the Development list about it and expect to post it this weekend.

comment:6 by idefix, 13 years ago

Seems I forgot to add a necessary check in my previous patch, see add_check.patch.

by idefix, 13 years ago

Attachment: add_check.patch added

Check if the mount point is set (implies that device is also set), before trying to mount the volume.

in reply to:  5 ; comment:7 by idefix, 13 years ago

Replying to idefix:

Replying to axeld:

BTW have you already looked into why BFS is mounted with the wrong character set by default under Linux by any chance? I have to pass iocharset=utf8 as parameter when mounting, ie. I need to mount it manually or else it's wrong.

No, I never experienced this issue.

I investigated this further and I think that I never experienced it because my locale is set to utf-8.

The iocharset can be initialised to utf8 instead of NULL here, but then this check would be unnecessary. Maybe the befs kernel driver can check if the locale is set to utf-8 and if it isn't (and iocharset isn't specified), set iocharset to utf8.

in reply to:  7 ; comment:8 by axeld, 13 years ago

Patch finally applied in hrev42626, sorry for the long delay.

Replying to idefix:

I investigated this further and I think that I never experienced it because my locale is set to utf-8.

Hm, I'm using Ubuntu -- how would I change that, or are you compiling your own kernel?

The iocharset can be initialised to utf8 instead of NULL here, but then this check would be unnecessary. Maybe the befs kernel driver can check if the locale is set to utf-8 and if it isn't (and iocharset isn't specified), set iocharset to utf8.

Yes, the default iocharset should always be UTF-8, and not whatever you compiled your Linux kernel with; that should only be what UTF-8 ends up being converted to. Maybe add a befs_load_nls_default() function instead of calling load_nls_default() that tries to use UTF-8, and only calls load_nls_default() if that fails?

in reply to:  8 comment:9 by idefix, 13 years ago

Replying to axeld:

Patch finally applied in hrev42626, sorry for the long delay.

Thanks! You may now close this ticket. ;)

Replying to idefix:

I investigated this further and I think that I never experienced it because my locale is set to utf-8.

Hm, I'm using Ubuntu -- how would I change that, or are you compiling your own kernel?

I'm using Ubuntu Natty, which version do you use? I think the problem you see should be fixed in Natty.

Yes, the default iocharset should always be UTF-8, and not whatever you compiled your Linux kernel with; that should only be what UTF-8 ends up being converted to.

I think that's how it's currently used in the befs kernel driver. But because CONFIG_NLS_DEFAULT was set wrong in Ubuntu versions previous to Natty, you would see strange results.

comment:10 by axeld, 13 years ago

Resolution: fixed
Status: newclosed

Ah, thanks! That makes sense then, as I still use its predecessor (can't stand Unity or the missing scrollbars, one UI desaster after the other).

Note: See TracTickets for help on using tickets.