diff mbox

UBIFS: Add an error code if the compr is not present

Message ID 1243234150-29786-1-git-send-email-corentincj@iksaif.net
State Accepted
Commit 8eec2f36fb869f1e6d81d834bbbd487941222fc8
Headers show

Commit Message

Corentin Chary May 25, 2009, 6:49 a.m. UTC
If the compressor is not present, mount_ubifs need
to return an error code. This way ubifs_fill_super
will stop and handle the error.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
---
 fs/ubifs/super.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Artem Bityutskiy May 25, 2009, 7:32 a.m. UTC | #1
On Mon, 2009-05-25 at 08:49 +0200, Corentin Chary wrote:
> If the compressor is not present, mount_ubifs need
> to return an error code. This way ubifs_fill_super
> will stop and handle the error.
> 
> Signed-off-by: Corentin Chary <corentincj@iksaif.net>

Pushed to ubifs-2.6.git, thank you!
Corentin Chary May 25, 2009, 7:52 a.m. UTC | #2
On Mon, May 25, 2009 at 9:32 AM, Artem Bityutskiy
<dedekind@infradead.org> wrote:
> On Mon, 2009-05-25 at 08:49 +0200, Corentin Chary wrote:
>> If the compressor is not present, mount_ubifs need
>> to return an error code. This way ubifs_fill_super
>> will stop and handle the error.
>>
>> Signed-off-by: Corentin Chary <corentincj@iksaif.net>
>
> Pushed to ubifs-2.6.git, thank you!
>

For information, this bug was triggered when running an userspace
version of ubifs (code available soon).
We used the original ubifs to format the partition, but our version
didn't support the lzo compressor (now, it do).
Then, valgrind/gdb to get a backtrace and "voila".
Artem Bityutskiy May 25, 2009, 8 a.m. UTC | #3
On Mon, 2009-05-25 at 09:52 +0200, Corentin Chary wrote:
> For information, this bug was triggered when running an userspace
> version of ubifs (code available soon).
> We used the original ubifs to format the partition, but our version
> didn't support the lzo compressor (now, it do).
> Then, valgrind/gdb to get a backtrace and "voila".

Userspace ubifs version. Wow! I wonder how it performs comparing
to the kernel space one.
Corentin Chary May 25, 2009, 8:33 a.m. UTC | #4
On Mon, May 25, 2009 at 10:00 AM, Artem Bityutskiy
<dedekind@infradead.org> wrote:
> On Mon, 2009-05-25 at 09:52 +0200, Corentin Chary wrote:
>> For information, this bug was triggered when running an userspace
>> version of ubifs (code available soon).
>> We used the original ubifs to format the partition, but our version
>> didn't support the lzo compressor (now, it do).
>> Then, valgrind/gdb to get a backtrace and "voila".
>
> Userspace ubifs version. Wow! I wonder how it performs comparing
> to the kernel space one.

Well, there is now big change in the code. For performance, it'll
depends of the fuse overhead. We'll see.
The big question is "how writeback will performs".

For the moment it's read-only (except for creating the default
filsystem), in fact our mkfs is just: erase all, mount, unmount.
diff mbox

Patch

diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 832b1a7..9a589d8 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1187,6 +1187,7 @@  static int mount_ubifs(struct ubifs_info *c)
 	if (!ubifs_compr_present(c->default_compr)) {
 		ubifs_err("'compressor \"%s\" is not compiled in",
 			  ubifs_compr_name(c->default_compr));
+		err = -ENOTSUPP;
 		goto out_free;
 	}