Lines Matching +full:close +full:- +full:range
4 # SPDX-License-Identifier: GPL-2.0-only
9 are supported - the FIEMAP ioctl and the 'SEEK_HOLE / SEEK_DATA' features of
33 # Get the block size of the host file-system for the image file by calling
54 is not supported either by the kernel or the file-system.
102 self.blocks_cnt = self.image_size + self.block_size - 1
124 self._f_image.close()
168 returns '-1'. Otherwise the data or hole position is returned."""
176 return -1
178 raise ErrorNotSupp("the kernel or file-system does not support "
232 raise ErrorNotSupp("the file-system does not support "
236 tmp_obj.close()
241 if offs == -1:
262 if start == -1 or start >= limit or start == self.image_size:
266 if end == -1 or end == self.image_size:
272 end_blk = end // self.block_size - 1
273 self._log.debug("FilemapSeek: yielding range (%d, %d)"
280 % (start, count, start + count - 1))
313 ioctl in order to work-around early FIEMAP implementation kernel bugs.
329 self._buf_size -= _FIEMAP_SIZE
359 # synchronizing the file is a necessary work-around.
371 "by the file-system"
437 # Extent length and offset have to be block-aligned
441 if extent_block > start + count - 1:
445 last = min(extent_block + extent_count, start + count) - 1
455 % (start, count, start + count - 1))
460 if last_prev == first - 1:
463 self._log.debug("FilemapFiemap: yielding range (%d, %d)"
468 self._log.debug("FilemapFiemap: yielding range (%d, %d)"
492 % (start, count, start + count - 1))
493 yield (start, start + count -1)
497 Create and return an instance of a Filemap class - 'FilemapFiemap' or
535 dst_size = os.path.getsize(src_fname) + seek - skip
551 written += start - skip - written
554 dst_file.close()
557 dst_file.seek(seek + start - skip, os.SEEK_SET)
560 to_read = end - start
565 chunk_size = to_read - read
568 size = length - written
574 dst_file.close()
576 dst_file.close()