UBI: add some more comments

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Jan 8 02:59:02 EST 2008


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=c63a491d3737aec3c47c5e785d87021752ad9fa6
Commit:     c63a491d3737aec3c47c5e785d87021752ad9fa6
Parent:     cae0a77125467c42f0918e78457913ee4a2f925b
Author:     Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
AuthorDate: Mon Dec 17 13:21:07 2007 +0200
Committer:  Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
CommitDate: Wed Dec 26 19:15:15 2007 +0200

    UBI: add some more comments
    
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
---
 drivers/mtd/ubi/eba.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index b2b0f29..2ff3492 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -797,7 +797,7 @@ write_error:
 /*
  * ubi_eba_atomic_leb_change - change logical eraseblock atomically.
  * @ubi: UBI device description object
- * @vol: volume escription object
+ * @vol: volume description object
  * @lnum: logical eraseblock number
  * @buf: data to write
  * @len: how many bytes to write
@@ -955,6 +955,12 @@ int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to,
 	/*
 	 * We may race with volume deletion/re-size, so we have to hold
 	 * @ubi->volumes_lock.
+	 *
+	 * Note, it is not a problem if we race with volume deletion or re-size
+	 * here. If the volume is deleted or re-sized while we are moving an
+	 * eraseblock which belongs to this volume, we'll end up with finding
+	 * out that this LEB was unmapped at the end (see WL), and drop this
+	 * PEB.
 	 */
 	spin_lock(&ubi->volumes_lock);
 	vol = ubi->volumes[idx];



More information about the linux-mtd-cvs mailing list