[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <A765B125120D1346A63912DDE6D8B6310BF4CEE8@NTXXIAMBX02.xacn.micron.com>
Date: Mon, 28 Sep 2015 07:02:52 +0000
From: Bean Huo 霍斌斌 (beanhuo)
<beanhuo@...ron.com>
To: "dedekind1@...il.com" <dedekind1@...il.com>,
"adrian.hunter@...el.com" <adrian.hunter@...el.com>,
"computersforpeace@...il.com" <computersforpeace@...il.com>,
"baruch@...s.co.il" <baruch@...s.co.il>,
"asierra@...-inc.com" <asierra@...-inc.com>,
"guz.fnst@...fujitsu.com" <guz.fnst@...fujitsu.com>,
"gsi@...x.de" <gsi@...x.de>, "richard@....at" <richard@....at>,
Boris Brezillon <boris.brezillon@...e-electrons.com>
CC: Boris Brezillon <boris.brezillon@...e-electrons.com>,
David Woodhouse <dwmw2@...radead.org>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
Artem Bityutskiy <dedekind1@...il.com>,
Richard Weinberger <richard@....at>,
Frank Liu 刘群 (frankliu)
<frankliu@...ron.com>, Andrea Scian <rnd4@...e-tech.it>,
Peter Pan 潘柏宏 (peterpan)
<peterpan@...ron.com>,
Karl Zhang 张双锣 (karlzhang)
<karlzhang@...ron.com>,
Iwo Mergler <Iwo.Mergler@...commwireless.com>,
"Jeff Lauruhn (jlauruhn)" <jlauruhn@...ron.com>,
Stefan Roese <sr@...x.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH 4/9] fs:ubifs: add hook for UBI bakvol in ubifs layer
Add hook for UBI bakvol in ubifs layer.
open/close bakvol operation in ubifs mount.
Signed-off-by: Bean Huo <beanhuo@...ron.com>
---
fs/ubifs/super.c | 6 ++++++
fs/ubifs/ubifs.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 9547a278..f3bf548 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1463,6 +1463,8 @@ static int mount_ubifs(struct ubifs_info *c)
dbg_gen("max. seq. number: %llu", c->max_sqnum);
dbg_gen("commit number: %llu", c->cmt_no);
+ init_bakvol(c->ubi, 1);
+
return 0;
out_infos:
@@ -1774,6 +1776,10 @@ static void ubifs_put_super(struct super_block *sb)
* the mutex is locked.
*/
mutex_lock(&c->umount_mutex);
+
+ /* Disable ubi MLC power loss backup function */
+ init_bakvol(c->ubi, 0);
+
if (!c->ro_mount) {
/*
* First of all kill the background thread to make sure it does
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index de75902..4af2d5a 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -1479,6 +1479,7 @@ extern const struct inode_operations ubifs_dir_inode_operations;
extern const struct inode_operations ubifs_symlink_inode_operations;
extern struct backing_dev_info ubifs_backing_dev_info;
extern struct ubifs_compressor *ubifs_compressors[UBIFS_COMPR_TYPES_CNT];
+extern void init_bakvol(struct ubi_volume_desc *desc, uint8_t choice);
/* io.c */
void ubifs_ro_mode(struct ubifs_info *c, int err);
--
1.9.1
Powered by blists - more mailing lists