Hi,

On 2 December 2013 19:24, Yousong Zhou <yszhou4t...@gmail.com> wrote:
> Hi, John and all.
>
> On 2 December 2013 14:51, John Crispin <j...@phrozen.org> wrote:
>> On 02/12/13 04:58, Yousong Zhou wrote:
>>>
>>> On ar71xx platform, /dev/inotify is not created by default. Create it
>>> when inotify is enabled.
>>>
>>> This should close ticket #10711.
>>>
>>> Signed-off-by: Yousong Zhou<yszhou4t...@gmail.com>
>>> ---
>>>   multimedia/minidlna/files/minidlna.init |    3 +++
>>>   1 files changed, 3 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/multimedia/minidlna/files/minidlna.init
>>> b/multimedia/minidlna/files/minidlna.init
>>> index 581c8d1..60602c1 100644
>>> --- a/multimedia/minidlna/files/minidlna.init
>>> +++ b/multimedia/minidlna/files/minidlna.init
>>> @@ -48,6 +48,9 @@ minidlna_create_config() {
>>>
>>>         [ -z "$interface" -o -t "$port" ]&&  return 1
>>>
>>> +       config_get_bool inotify $cfg inotify
>>> +       [ "$inotify" -gt 0 ]&&  [ ! -c /dev/inotify ]&&  mknod
>>> /dev/inotify c 10 63;
>>> +
>>>         echo "# this file is generated automatically, don't edit">
>>> "$MINIDLNA_CONFIG_FILE"
>>>
>>>         minidlna_cfg_append "port=$port"
>>
>>
>> Hi,
>>
>> creating the device node inside a init.d script seems wrong
>>
>> can you try and figure out why hotplug.d is not creating the node ?
>
> Please forget this patch. inotify uses system call interface now. No
> device node is involved.
>
> Shame on me that after creating the node and restarting minidlna, it
> created an illusion that inotify for minidlna started working.
> Nevertheless, there do exist situation that is not noticed by
> minidlna. I'll look into that.

I wrote a simple program to test inotify support on OpenWrt.  It looks
like overlayfs' support for inotify is not very well.  Events like
IN_CLOSE_WRITE are not informed to registered process.

In the case of minidlna, it received only IN_CREATE event and found
out that it was an invalid media file. IN_CLOSE_WRITE was not sent at
all.  Currently, to work around this, we can set media_dir to the
actual filesystem directory, like /overlay/root/minidlna, instead of
/root/minidlna.


                yousong
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to