Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

get_block_size crashes on aufs #15

Closed
kad opened this issue May 17, 2016 · 2 comments
Closed

get_block_size crashes on aufs #15

kad opened this issue May 17, 2016 · 2 comments
Labels
Milestone

Comments

@kad
Copy link
Member

kad commented May 17, 2016

easily reproducible in docker container (not over btrfs or lvm storage drivers)

./bmaptool create /tmp/test.img
Traceback (most recent call last):
  File "./bmaptool", line 744, in <module>
    sys.exit(main())
  File "./bmaptool", line 728, in main
    args.func(args, log)
  File "./bmaptool", line 558, in create_command
    creator = BmapCreate.BmapCreate(args.image, output, "sha256", log)
  File "/home/kad/git/bmap-tools/bmaptools/BmapCreate.py", line 175, in __init__
    self.filemap = Filemap.filemap(self._f_image, self._log)
  File "/home/kad/git/bmap-tools/bmaptools/Filemap.py", line 518, in filemap
    return FilemapFiemap(image, log)
  File "/home/kad/git/bmap-tools/bmaptools/Filemap.py", line 335, in __init__
    _FilemapBase.__init__(self, image, log)
  File "/home/kad/git/bmap-tools/bmaptools/Filemap.py", line 86, in __init__
    self.blocks_cnt /= self.block_size
ZeroDivisionError: integer division or modulo by zero
@kad kad added this to the 3.4 milestone May 17, 2016
@kad kad added the bug label May 17, 2016
@dedekind
Copy link
Contributor

Nice catch. Are you testing this on every file-system?

@kad
Copy link
Member Author

kad commented May 18, 2016

no, it was reported as part of testing under docker, where people are using default "dumb" storage to put build results.

kad added a commit to kad/bmap-tools that referenced this issue May 21, 2016
Under some conditions, ioctl FIGETBSZ can't return real value.
We can try to use fallback via os.stat() to get block size.

Closes intel#15

Signed-off-by: Alexander D. Kanevskiy <kad@kad.name>
kad added a commit to kad/bmap-tools that referenced this issue May 21, 2016
Under some conditions, ioctl FIGETBSZ can't return real value.
We can try to use fallback via os.stat() to get block size.

Closes intel#15

Signed-off-by: Alexander D. Kanevskiy <kad@kad.name>
@kad kad closed this as completed in #16 May 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants