Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f627a8a authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6

* 'linux-next' of git://git.infradead.org/ubifs-2.6: (25 commits)
  UBIFS: clean-up commentaries
  UBIFS: save 128KiB or more RAM
  UBIFS: allocate orphans scan buffer on demand
  UBIFS: allocate lpt dump buffer on demand
  UBIFS: allocate ltab checking buffer on demand
  UBIFS: allocate scanning buffer on demand
  UBIFS: allocate dump buffer on demand
  UBIFS: do not check data crc by default
  UBIFS: simplify UBIFS Kconfig menu
  UBIFS: print max. index node size
  UBIFS: handle allocation failures in UBIFS write path
  UBIFS: use max_write_size during recovery
  UBIFS: use max_write_size for write-buffers
  UBIFS: introduce write-buffer size field
  UBI: incorporate LEB offset information
  UBIFS: incorporate maximum write size
  UBI: provide LEB offset information
  UBI: incorporate maximum write size
  UBIFS: fix LEB number in printk
  UBIFS: restrict world-writable debugfs files
  ...
parents fd57ed02 5d630e43
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -82,12 +82,12 @@ Mount options
bulk_read		read more in one go to take advantage of flash
			media that read faster sequentially
no_bulk_read (*)	do not bulk-read
no_chk_data_crc		skip checking of CRCs on data nodes in order to
no_chk_data_crc (*)	skip checking of CRCs on data nodes in order to
			improve read performance. Use this option only
			if the flash media is highly reliable. The effect
			of this option is that corruption of the contents
			of a file can go unnoticed.
chk_data_crc (*)	do not skip checking CRCs on data nodes
chk_data_crc		do not skip checking CRCs on data nodes
compr=none              override default compressor and set it to "none"
compr=lzo               override default compressor and set it to "lzo"
compr=zlib              override default compressor and set it to "zlib"
+14 −0
Original line number Diff line number Diff line
@@ -690,11 +690,25 @@ static int io_init(struct ubi_device *ubi)
	ubi_assert(ubi->hdrs_min_io_size <= ubi->min_io_size);
	ubi_assert(ubi->min_io_size % ubi->hdrs_min_io_size == 0);

	ubi->max_write_size = ubi->mtd->writebufsize;
	/*
	 * Maximum write size has to be greater or equivalent to min. I/O
	 * size, and be multiple of min. I/O size.
	 */
	if (ubi->max_write_size < ubi->min_io_size ||
	    ubi->max_write_size % ubi->min_io_size ||
	    !is_power_of_2(ubi->max_write_size)) {
		ubi_err("bad write buffer size %d for %d min. I/O unit",
			ubi->max_write_size, ubi->min_io_size);
		return -EINVAL;
	}

	/* Calculate default aligned sizes of EC and VID headers */
	ubi->ec_hdr_alsize = ALIGN(UBI_EC_HDR_SIZE, ubi->hdrs_min_io_size);
	ubi->vid_hdr_alsize = ALIGN(UBI_VID_HDR_SIZE, ubi->hdrs_min_io_size);

	dbg_msg("min_io_size      %d", ubi->min_io_size);
	dbg_msg("max_write_size   %d", ubi->max_write_size);
	dbg_msg("hdrs_min_io_size %d", ubi->hdrs_min_io_size);
	dbg_msg("ec_hdr_alsize    %d", ubi->ec_hdr_alsize);
	dbg_msg("vid_hdr_alsize   %d", ubi->vid_hdr_alsize);
+2 −0
Original line number Diff line number Diff line
@@ -40,7 +40,9 @@ void ubi_do_get_device_info(struct ubi_device *ubi, struct ubi_device_info *di)
{
	di->ubi_num = ubi->ubi_num;
	di->leb_size = ubi->leb_size;
	di->leb_start = ubi->leb_start;
	di->min_io_size = ubi->min_io_size;
	di->max_write_size = ubi->max_write_size;
	di->ro_mode = ubi->ro_mode;
	di->cdev = ubi->cdev.dev;
}
+3 −0
Original line number Diff line number Diff line
@@ -382,6 +382,8 @@ struct ubi_wl_entry;
 * @bad_allowed: whether the MTD device admits of bad physical eraseblocks or
 *               not
 * @nor_flash: non-zero if working on top of NOR flash
 * @max_write_size: maximum amount of bytes the underlying flash can write at a
 *                  time (MTD write buffer size)
 * @mtd: MTD device descriptor
 *
 * @peb_buf1: a buffer of PEB size used for different purposes
@@ -463,6 +465,7 @@ struct ubi_device {
	int vid_hdr_shift;
	unsigned int bad_allowed:1;
	unsigned int nor_flash:1;
	int max_write_size;
	struct mtd_info *mtd;

	void *peb_buf1;
+10 −13
Original line number Diff line number Diff line
@@ -44,23 +44,20 @@ config UBIFS_FS_ZLIB

# Debugging-related stuff
config UBIFS_FS_DEBUG
	bool "Enable debugging"
	bool "Enable debugging support"
	depends on UBIFS_FS
	select DEBUG_FS
	select KALLSYMS_ALL
	help
	  This option enables UBIFS debugging.

config UBIFS_FS_DEBUG_MSG_LVL
	int "Default message level (0 = no extra messages, 3 = lots)"
	depends on UBIFS_FS_DEBUG
	default "0"
	help
	  This controls the amount of debugging messages produced by UBIFS.
	  If reporting bugs, please try to have available a full dump of the
	  messages at level 1 while the misbehaviour was occurring. Level 2
	  may become necessary if level 1 messages were not enough to find the
	  bug. Generally Level 3 should be avoided.
	  This option enables UBIFS debugging support. It makes sure various
	  assertions, self-checks, debugging messages and test modes are compiled
	  in (this all is compiled out otherwise). Assertions are light-weight
	  and this option also enables them. Self-checks, debugging messages and
	  test modes are switched off by default. Thus, it is safe and actually
	  recommended to have debugging support enabled, and it should not slow
	  down UBIFS. You can then further enable / disable individual  debugging
	  features using UBIFS module parameters and the corresponding sysfs
	  interfaces.

config UBIFS_FS_DEBUG_CHKS
	bool "Enable extra checks"
Loading