Hi,
is this neccessary ? should a forced detach not be enough ? that is
why we added the forced detach ioctl.
could you try to use "ubi detach rootfs" instead of unmount ?
John
On 23/05/2014 14:40, Daniel wrote:
> Hi André,
>
> I'm also working a lot on UBI(fs) support lately. First of all, a
> patch like this one is needed also for squashfs on ubiblock or any
> platform with a root device which actually got some sort of
> locking... I used a hack jow made at some point on my UBI targets
> to solve this for now
> https://www.gitorious.org/openwrt-oxnas/openwrt-oxnas/commit/ac14e2e15f99c90f38addb12074579763e3dd62a
>
> It's nice to see that you made a nicer solution for this problem
> and I gave it a shot on my targets with good results.
>
> I got some comments which I will write as reply to the individual
> patches.
>
>
> Cheers
>
> Daniel
>
> On 05/22/2014 10:16 PM, André Valentin wrote:
>> Hi!
>
>> I'm playing with different hardware, mainly with NAND storage.
>> I'm happy with ubi and ubifs, because it makes life easier and is
>> a nice tool like lvm. But I noticed that I was unable to upgrade
>> an ubifs volume. I used the sysupgrade framework, it unmounted
>> root and killed several process. rootfs was unmounted, but I
>> still was not allowed to write the new image. I always got
>> "Resource busy". It seems that the left over processes (procd,
>> ash, telnet) still keep the ubifs volume open. So I deciced to
>> add an upgrade feature to procd. This allows procd to exec an
>> upgrade command, so allowing it to run as PID 1. I were able to
>> kill all processes, and the update went fine.
>
>> These patches now do the following: procd: Add an ubus
>> function which starts the upgrade process sysupgrade: Add an
>> special switch for this update type and allow the script to kill
>> all processes if run under PID 1. platform.sh: Example sysupgrade
>> plattform code for my developement tree.
>
>
>> Please consider these patches as a RFC. They are not final and
>> need your expertise and hints. I do appreciate every proposal.
>
>> André
>
>> André Valentin (3): procd: add support for running sysupgrade as
>> PID 1 sysupgrade: add support for running sysupgrade as PID 1
>> bcm53xx_brcm: add sysupgrade support
>
>> package/base-files/files/lib/upgrade/common.sh | 32 +++---
>> package/base-files/files/sbin/sysupgrade | 13 +++
>> package/system/procd/patches/100-sysupgrade.patch | 73
>> +++++++++++++ .../base-files/lib/upgrade/platform.sh
>> | 108 ++++++++++++++++++++ 4 files changed, 214 insertions(+),
>> 12 deletions(-) create mode 100644
>> package/system/procd/patches/100-sysupgrade.patch create mode
>> 100755
>> target/linux/bcm53xx_brcm/base-files/lib/upgrade/platform.sh
>
>
>
> _______________________________________________ openwrt-devel
> mailing list [email protected]
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel