public inbox for
 help / color / mirror / Atom feed
From: Stanislav Meduna <>
Subject: jffs2 garbage collect thread
Date: Mon, 20 Feb 2012 11:42:00 -0000	[thread overview]
Message-ID: <> (raw)


anyone knows whether it is now safe to enable the JFFS2 garbage
collect thread?

The CDL comment says:

  Enable background garbage collection thread, for making
  free space ahead of time. Leave this off till it's been
  implemented. And don't implement it till icache locking has
  been made thread-safe.

The icache locking probably is not thread-safe per-se, but
the fs-ecos.c says

  FSTAB_ENTRY(jffs2_fste, "jffs2", 0,

and the thread itself does cyg_fs_lock around the garbage
collect pass

  cyg_fs_lock(mte, mte->fs->syncmode);

  if (jffs2_garbage_collect_pass(c) == -ENOSPC) {
    printf("No space for garbage collection. "
           "Aborting JFFS2 GC thread\n");
  cyg_fs_unlock(mte, mte->fs->syncmode);

To me it looks safe - am I overlooking something?

The reason I need to control garbage collect explicitely is that
I need to make sure a filesystem has some amount of free space
before starting an operation. So I want to trigger a garbage collect
explicitely and then decide according to the superblock information.
Can I use this model or are there any hidden dangers?


                 reply	other threads:[~2012-02-20 11:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

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

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).