On Tue, Apr 30, 2019 at 4:29 PM Yuichi Nakai <xoxyuxu@xxxxxxxxx> wrote: > > UBIFS has a journal recovery function. > It is useful for devices that experience a power failure. > > And as per comment of ubifs_wbuf_sync_nolock(), wbuf is optimized for > performance by writing aligned max_write_size. > > In following environment, checking offset is not aligned to max_write_buffer. > > - Using a SPI-NOR device with a write buffer size over 256 bytes > For example: Micron MT28EW01GABA, its write buffer is 512 words > - LEB hedaer size is 64 bytes > - UBI header size is 64 bytes There are no such things are LEB or UBI header. Do you mean UBI EC und UBI VID headers? What is c->leb_start in your case? > So if write buffer command make a crrupt data in a block, > is_last_write() and no_more_nodes() can not check correctly. > > This patch adjusts wbuf writes to max_write_size, taking into account > leb_start. The recovery process also checks the data at the corrected > alignment position. I have a hard time understanding your patch. Are you facing a failure? If so, please share it. -- Thanks, //richard ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/