Skip to content

Adjust LinuxFileSystemNatives.allocatedSizeInBytes for aarch64 architectures#81376

Merged
tlrx merged 1 commit intoelastic:masterfrom
tlrx:xstat-on-aarch64
Dec 7, 2021
Merged

Adjust LinuxFileSystemNatives.allocatedSizeInBytes for aarch64 architectures#81376
tlrx merged 1 commit intoelastic:masterfrom
tlrx:xstat-on-aarch64

Conversation

@tlrx
Copy link
Copy Markdown
Member

@tlrx tlrx commented Dec 6, 2021

The native method added in #80437 requires some adjustments to work on aarch64 architectures, which hopefully this change addresses. The stat version has been tested on AWS 64-bit ARM instances (on ubuntu-18.04 and on Amazon Linux 2).

Closes #81362

@tlrx tlrx added >bug :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v8.1.0 labels Dec 6, 2021
@elasticmachine elasticmachine added the Team:Distributed Meta label for distributed team. label Dec 6, 2021
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@tlrx tlrx requested a review from DaveCTurner December 7, 2021 09:10
Copy link
Copy Markdown
Member

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

👍

Comment on lines +46 to +52
* For x86-64 the _STAT_VER used is:
* # define _STAT_VER_LINUX 1
* # define _STAT_VER _STAT_VER_LINUX
*
* For other architectures the _STAT_VER used is:
* # define _STAT_VER_LINUX 0
* # define _STAT_VER _STAT_VER_LINUX
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We really need #80903 to deal with this sort of nonsense.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I agree, I'm a bit afraid if the _xstat function changes over time and we don't catch it before in our tests.

@tlrx tlrx merged commit 9788056 into elastic:master Dec 7, 2021
@tlrx tlrx deleted the xstat-on-aarch64 branch December 7, 2021 09:31
@tlrx
Copy link
Copy Markdown
Member Author

tlrx commented Dec 7, 2021

Thanks David! Let's see if that works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs Team:Distributed Meta label for distributed team. v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] CacheFileTests.testCacheFileCreatedAsSparseFile fails on master

3 participants