ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Anton Farygin <rider@altlinux.com>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] баги в tmpfs: hasher ... и ттеперь udev
Date: Tue, 16 May 2006 12:25:42 +0400
Message-ID: <44698C86.6090502@altlinux.com> (raw)
In-Reply-To: <44698C09.3000102@altlinux.com>

Anton Farygin wrote:
> Привет.
> 
> Совсем недавно обсуждалась проблема, которая вылезала при работе 
> hasher'а на tmpfs.
> 
> Так вот оказывается, что мы её словили на udev-091-alt2.
> 
> workaround я нашёл судя по всему, но зато теперь появился testcase, 
> который с большой вероятностью позволит воспроизводить эту проблему.
> 
> Вот такой код в udevd:
> static void export_initial_seqnum(void)
> {
>          char filename[PATH_SIZE];
>          int fd;
>          char seqnum[32];
>          ssize_t len = 0;
> 
>          strlcpy(filename, sysfs_path, sizeof(filename));
>          strlcat(filename, "/kernel/uevent_seqnum", sizeof(filename));
>          fd = open(filename, O_RDONLY);
>          if (fd >= 0) {
>                  len = read(fd, seqnum, sizeof(seqnum)-1);
>                  close(fd);
>          }
>          if (len <= 0) {
>                  strcpy(seqnum, "0\n");
>                  len = 3;
>          }
>          strlcpy(filename, udev_root, sizeof(filename));
>          strlcat(filename, "/" EVENT_SEQNUM, sizeof(filename));
>          create_path(filename);
>          fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0644);
>          if (fd >= 0) {
>                  write(fd, seqnum, len);
>                  close(fd);
>          }
> }
> 
> приводил к тому, что файл /dev/.udevd/uevent_seqnum на некоторых машинах 
>   появлялся с очень большой задержкой (большое 0.5 секунды), что 
> естественно приводило к проблемам.
> 
> По моему это явно можно интерпретировать как проблему tmpfs.
> 
> Конечно надо ещё поэкпериментировать и написать более внятный testcase..
> 
> Но всё-таки это уже не hasher ;)

Кстати, поможет ли опции sync при монтировании ?

Rgds,
Rider



  reply	other threads:[~2006-05-16  8:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-16  8:23 Anton Farygin
2006-05-16  8:25 ` Anton Farygin [this message]
2006-05-16  9:00   ` Anton Farygin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44698C86.6090502@altlinux.com \
    --to=rider@altlinux.com \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git