Skip to contentSkip to conversation

Export UBI map/unmap/is_mapped in userspace

PATCH In review Corentin Chary 2 participants 3 messages Jan 5, 2009 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

cover Export UBI map/unmap/is_mapped in userspace

Hi,
These are three patch to make a usespace program able to use map/unmap operation and to query if a LEB is mapped.
We are trying to do an UBI based userspace filesystem (using fuse) and we needed these, but it could also be used for testing purpose. CONFIG_MTD_UBI_DEBUG_USERSPACE_IO is needed to enable theses functions.

Thanks

#1 lore raw

Hi,

Quoted 4 lines · Corentin Chary

These are three patch to make a usespace program able to use map/unmap operation and to query if a LEB is mapped.
We are trying to do an UBI based userspace filesystem (using fuse) and we needed these, but it could also be used for testing purpose.

OK.

Quoted 1 line

CONFIG_MTD_UBI_DEBUG_USERSPACE_IO is needed to enable theses functions.

In your patches I do not see why these ioctl's are enabled only if the CONFIG_MTD_UBI_DEBUG_USERSPACE_IO configuration option is switched on. It looks like the ioctl's are always enabled.

Well, you probably also need direct LEB write functionality, which is present only as a debugging option so far. We may make it non-debugging at some point, I guess. The reason why we disabled this is because we wanted to prevent dump users from doing stupid things.

Signature · 2 lines
Best regards,
Artem Bityutskiy (Битюцкий Артём)
#2 lore raw
Quoted 4 lines

In your patches I do not see why these ioctl's are enabled only if the CONFIG_MTD_UBI_DEBUG_USERSPACE_IO configuration option is switched on. It looks like the ioctl's are always enabled.

Look the litle "#endif" at the end, it's the one for "#ifdef CONFIG_MTD_UBI_DEBUG_USERSPACE_IO" used for UBI_IOCEBER

We make these using CONFIG_MTD_UBI_DEBUG_USERSPACE_IO only because direct write and erase use that too.
But if you make it non-debugging, it'll be easier for us.

Signature · 2 lines
Corentin Chary
http://xf.iksaif.net