* [PATCH 4/9] fs:ubifs: add hook for UBI bakvol in ubifs layer
@ 2015-09-28 7:02 Bean Huo 霍斌斌 (beanhuo)
2015-09-28 11:21 ` Boris Brezillon
0 siblings, 1 reply; 2+ messages in thread
From: Bean Huo 霍斌斌 (beanhuo) @ 2015-09-28 7:02 UTC (permalink / raw)
To: dedekind1@gmail.com, adrian.hunter@intel.com,
computersforpeace@gmail.com, baruch@tkos.co.il,
asierra@xes-inc.com, guz.fnst@cn.fujitsu.com, gsi@denx.de,
richard@nod.at, Boris Brezillon
Cc: Boris Brezillon, David Woodhouse, linux-mtd@lists.infradead.org,
Artem Bityutskiy, Richard Weinberger,
Frank Liu 刘群 (frankliu), Andrea Scian,
Peter Pan 潘柏宏 (peterpan),
Karl Zhang 张双锣 (karlzhang), Iwo Mergler,
Jeff Lauruhn (jlauruhn), Stefan Roese,
linux-kernel@vger.kernel.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 1613 bytes --]
Add hook for UBI bakvol in ubifs layer.
open/close bakvol operation in ubifs mount.
Signed-off-by: Bean Huo <beanhuo@micron.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
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 4/9] fs:ubifs: add hook for UBI bakvol in ubifs layer
2015-09-28 7:02 [PATCH 4/9] fs:ubifs: add hook for UBI bakvol in ubifs layer Bean Huo 霍斌斌 (beanhuo)
@ 2015-09-28 11:21 ` Boris Brezillon
0 siblings, 0 replies; 2+ messages in thread
From: Boris Brezillon @ 2015-09-28 11:21 UTC (permalink / raw)
To: Bean Huo 霍斌斌 (beanhuo)
Cc: dedekind1@gmail.com, adrian.hunter@intel.com,
computersforpeace@gmail.com, baruch@tkos.co.il,
asierra@xes-inc.com, guz.fnst@cn.fujitsu.com, gsi@denx.de,
richard@nod.at, David Woodhouse, linux-mtd@lists.infradead.org,
Frank Liu 刘群 (frankliu), Andrea Scian,
Peter Pan 潘柏宏 (peterpan),
Karl Zhang 张双锣 (karlzhang), Iwo Mergler,
Jeff Lauruhn (jlauruhn), Stefan Roese,
linux-kernel@vger.kernel.org
On Mon, 28 Sep 2015 07:02:52 +0000
Bean Huo 霍斌斌 (beanhuo) <beanhuo@micron.com> wrote:
> Add hook for UBI bakvol in ubifs layer.
>
> open/close bakvol operation in ubifs mount.
>
> Signed-off-by: Bean Huo <beanhuo@micron.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);
This function is implemented in patch 9 and you're using it here, which
means your series is not bisectable.
Also, do we really want to let UBIFS decide whether this feature should
be enabled or not for the whole UBI device?
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-28 11:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-28 7:02 [PATCH 4/9] fs:ubifs: add hook for UBI bakvol in ubifs layer Bean Huo 霍斌斌 (beanhuo)
2015-09-28 11:21 ` Boris Brezillon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox