Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: Add o.fd.U.Filesystem.Size property #477

Merged
merged 1 commit into from
Jan 9, 2018
Merged

core: Add o.fd.U.Filesystem.Size property #477

merged 1 commit into from
Jan 9, 2018

Conversation

mvollmer
Copy link
Contributor

@mvollmer mvollmer commented Dec 15, 2017

This allows the client to detect filesystems that could be resized to
fill more of their block device.

@mvollmer
Copy link
Contributor Author

I am still working on this, but this is a good preview, I think. Wdyt?

@vpodzime
Copy link
Contributor

I am still working on this, but this is a good preview, I think. Wdyt?

I think you should use [libblockdev] (http://storaged.org/libblockdev/libblockdev-FS.html) here and store the info just in UDisks not in udev.

@mvollmer
Copy link
Contributor Author

I think you should use [libblockdev]

Makes sense, thanks!

@mvollmer mvollmer changed the title WIP - core: Add o.fd.U.Filesystem.Size property core: Add o.fd.U.Filesystem.Size property Dec 19, 2017
@mvollmer
Copy link
Contributor Author

Rewritten with libblockdev, tests added.

@vojtechtrefny
Copy link
Member

Jenkins, ok to test.

Copy link
Member

@vojtechtrefny vojtechtrefny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Looks good to me otherwise.

disk.Resize(dbus.UInt64(size // 2), self.no_options, dbus_interface=self.iface_prefix + '.Filesystem')
self.assertTrue(disk.Check(self.no_options, dbus_interface=self.iface_prefix + '.Filesystem'))
self.get_property(disk, '.Filesystem', 'Size').assertEqual(size // 2)

def test_size(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please skip this test for unsupported filesystems and filesystems that can't be created and/or mounted (see _can_create and _can_mount in other tests).

Also please "skip" this test for the FailsystemTestCase.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, not yet. I forgot that we only report this for ext and xfs... that's what you meant with "unsupported", obviously.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be done now. There are test failures, but I think they are unrelated, no?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the failures definitely look unrelated. Thanks.

This allows the client to detect filesystems that could be resized to
fill more of their block device.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants