lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <A765B125120D1346A63912DDE6D8B6310BF4CEDA@NTXXIAMBX02.xacn.micron.com>
Date:	Mon, 28 Sep 2015 07:02:40 +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 2/9] drivers:mtd:ubi:add definition for UBI bakvol operation

Add macro definition for UBI bakvol operation.

Signed-off-by: Bean Huo <beanhuo@...ron.com>
---
 drivers/mtd/ubi/ubi.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index 2974b67..746dfbe 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -438,6 +438,7 @@ struct ubi_debug_info {
  * @vtbl_slots: how many slots are available in the volume table
  * @vtbl_size: size of the volume table in bytes
  * @vtbl: in-RAM volume table copy
+ * @bkblk_tbl: backup block table
  * @device_mutex: protects on-flash volume table and serializes volume
  *                creation, deletion, update, re-size, re-name and set
  *                property
@@ -547,6 +548,7 @@ struct ubi_device {
 	int vtbl_slots;
 	int vtbl_size;
 	struct ubi_vtbl_record *vtbl;
+	struct ubi_bkblk_tbl *bkblk_tbl;
 	struct mutex device_mutex;
 
 	int max_ec;
@@ -797,6 +799,20 @@ int ubi_vtbl_rename_volumes(struct ubi_device *ubi,
 			    struct list_head *rename_list);
 int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_attach_info *ai);
 
+/* bakvol.c*/
+int ubi_check_backup_volume(struct ubi_device *ubi);
+int ubi_backup_data_to_backup_volume(struct ubi_device *ubi, loff_t addr,
+		size_t len, size_t *retlen, const void *buf);
+int ubi_backup_volume_init(struct ubi_device *ubi);
+int ubi_backup_volume_scan(struct ubi_device *ubi,
+			struct ubi_vid_hdr *vidh, int pnum);
+int ubi_backup_volume_init_tail(struct ubi_device *ubi,
+				struct ubi_attach_info *si);
+int ubi_bad_data_recovery(struct ubi_device *ubi);
+int is_backup_need(struct ubi_device *ubi, loff_t addr);
+void init_bakvol(struct ubi_volume_desc *desc, uint8_t choice);
+void clear_bakvol(struct ubi_device *ubi);
+
 /* vmt.c */
 int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req);
 int ubi_remove_volume(struct ubi_volume_desc *desc, int no_vtbl);
@@ -846,6 +862,7 @@ int self_check_eba(struct ubi_device *ubi, struct ubi_attach_info *ai_fastmap,
 
 /* wl.c */
 int ubi_wl_get_peb(struct ubi_device *ubi);
+int ubi_wl_get_plane_peb(struct ubi_device *ubi, int plane);
 int ubi_wl_put_peb(struct ubi_device *ubi, int vol_id, int lnum,
 		   int pnum, int torture);
 int ubi_wl_flush(struct ubi_device *ubi, int vol_id, int lnum);
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ