#19564: after reboot - reset to defaults / firstboot by accident
------------------------+------------------------
  Reporter:  bittorf@…  |      Owner:  developers
      Type:  defect     |     Status:  new
  Priority:  highest    |  Milestone:
 Component:  packages   |    Version:  Trunk
Resolution:             |   Keywords:
------------------------+------------------------

Comment (by jow):

 Okay. So for now it looks like the xattr which tracks the completion state
 gets corrupted in jffs2's "/" leading the system to believe that the
 overlay needs to cleared and rebuilt again on next boot.

 To gain additional clues it would make sense to add a little bit more
 tracking around the xattr handling, like that:
 {{{
 #!diff
 diff --git a/libfstools/overlay.c b/libfstools/overlay.c
 index 0677c34..b6c2bd2 100644
 --- a/libfstools/overlay.c
 +++ b/libfstools/overlay.c
 @@ -38,13 +38,17 @@ static bool keep_sysupgrade;
  static ssize_t
  fs_getxattr(const char *path, const char *name, void *value, size_t size)
  {
 -       return syscall(__NR_getxattr, path, name, value, size);
 +       ssize_t rv = syscall(__NR_getxattr, path, name, value, size);
 +       ULOG_INFO("fs_getxattr(%s) = %d (val=%u, errno=%d)\n", name, rv,
 *(uint32_t *)value, errno);
 +       return rv;
  }

  static ssize_t
  fs_setxattr(const char *path, const char *name, const void *value, size_t
 size, int flags)
  {
 -       return syscall(__NR_setxattr, path, name, value, size, flags);
 +       ssize_t rv = syscall(__NR_setxattr, path, name, value, size,
 flags);
 +       ULOG_INFO("fs_setxattr(%s, %u) = %d (errno=%d)\n", name,
 *(uint32_t *)value, rv, errno);
 +       return rv;
  }

  static int

 }}}

--
Ticket URL: <https://dev.openwrt.org/ticket/19564#comment:27>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to