Lines Matching refs:max_write_size
23 * write size (@c->max_write_size). The latter is the maximum amount of bytes
25 * @c->max_write_size units should presumably be faster. Obviously,
26 * @c->min_io_size <= @c->max_write_size. Write-buffers are of
27 * @c->max_write_size bytes in size for maximum performance. However, when a
33 * hand, we want to write in optimal @c->max_write_size bytes chunks, which
34 * also means aligning writes at the @c->max_write_size bytes offsets. On the
37 * the next write offset to be not aligned to @c->max_write_size bytes. So the
39 * to @c->max_write_size bytes again. We do this by temporarily shrinking
552 * Note, although write-buffers are of @c->max_write_size, this function does
553 * not necessarily writes all @c->max_write_size bytes to the flash. Instead,
573 ubifs_assert(c, wbuf->size <= c->max_write_size);
576 if (c->leb_size - wbuf->offs >= c->max_write_size)
577 ubifs_assert(c, !((wbuf->offs + wbuf->size) % c->max_write_size));
597 * Now @wbuf->offs is not necessarily aligned to @c->max_write_size.
599 * @c->max_write_size chunks and to @c->max_write_size-aligned offset.
600 * Thus, if @wbuf->offs is not aligned to @c->max_write_size now, make
602 * @c->max_write_size. This way we make sure that after next
604 * @c->max_write_size).
606 if (c->leb_size - wbuf->offs < c->max_write_size)
608 else if (wbuf->offs & (c->max_write_size - 1))
609 wbuf->size = ALIGN(wbuf->offs, c->max_write_size) - wbuf->offs;
611 wbuf->size = c->max_write_size;
647 if (c->leb_size - wbuf->offs < c->max_write_size)
649 else if (wbuf->offs & (c->max_write_size - 1))
650 wbuf->size = ALIGN(wbuf->offs, c->max_write_size) - wbuf->offs;
652 wbuf->size = c->max_write_size;
732 * does not take whole max. write unit (@c->max_write_size). Instead, the node
753 ubifs_assert(c, wbuf->size <= c->max_write_size);
758 if (c->leb_size - wbuf->offs >= c->max_write_size)
759 ubifs_assert(c, !((wbuf->offs + wbuf->size) % c->max_write_size));
792 if (c->leb_size - wbuf->offs >= c->max_write_size)
793 wbuf->size = c->max_write_size;
828 } else if (wbuf->offs & (c->max_write_size - 1)) {
831 * @c->max_write_size and @wbuf->size is less than
832 * @c->max_write_size. Write @wbuf->size bytes to make sure the
833 * following writes are done in optimal @c->max_write_size
910 if (c->leb_size - wbuf->offs >= c->max_write_size)
911 wbuf->size = c->max_write_size;
1154 wbuf->buf = kmalloc(c->max_write_size, GFP_KERNEL);
1158 size = (c->max_write_size / UBIFS_CH_SZ + 1) * sizeof(ino_t);
1170 * write-buffer size has to be set to @c->max_write_size. Otherwise,
1174 size = c->max_write_size - (c->leb_start % c->max_write_size);