Skip to content

8266610: Method RandomAccessFile#length() returns 0 for block devices on linux. #3914

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

Closed
wants to merge 2 commits into from

Conversation

vyommani
Copy link
Contributor

@vyommani vyommani commented May 7, 2021

RandomAccessFile.length() method for block device return always 0


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8266610: Method RandomAccessFile#length() returns 0 for block devices on linux.

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3914/head:pull/3914
$ git checkout pull/3914

Update a local copy of the PR:
$ git checkout pull/3914
$ git pull https://git.openjdk.java.net/jdk pull/3914/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3914

View PR using the GUI difftool:
$ git pr show -t 3914

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3914.diff

@bridgekeeper
Copy link

bridgekeeper bot commented May 7, 2021

👋 Welcome back vtewari! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot changed the title JDK-8266610: Method RandomAccessFile#length() returns 0 for block dev… 8266610: Method RandomAccessFile#length() returns 0 for block devices on linux. May 7, 2021
@openjdk openjdk bot added the rfr Pull request is ready for review label May 7, 2021
@openjdk
Copy link

openjdk bot commented May 7, 2021

@vyommani The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label May 7, 2021
@mlbridge
Copy link

mlbridge bot commented May 7, 2021

Webrevs

@vyommani vyommani marked this pull request as draft May 7, 2021 06:35
@vyommani vyommani marked this pull request as ready for review May 7, 2021 06:36
@openjdk openjdk bot added rfr Pull request is ready for review and removed rfr Pull request is ready for review labels May 7, 2021
Copy link
Contributor

@AlanBateman AlanBateman left a comment

Choose a reason for hiding this comment

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

I think this look okay, and consistent with the file dispatcher implementation.

@openjdk
Copy link

openjdk bot commented May 7, 2021

@vyommani This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8266610: Method RandomAccessFile#length() returns 0 for block devices on linux.

Reviewed-by: alanb, bpb

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 1236 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 7, 2021
Copy link
Member

@bplb bplb left a comment

Choose a reason for hiding this comment

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

Covers updated FileInputStream as well (JDK-8264777).

@huishi-hs
Copy link

Could required os = linux added for test/jdk/java/nio/channels/FileChannel/BlockDeviceSize.java? As it is decribed only run as linux.

@vyommani
Copy link
Contributor Author

vyommani commented May 9, 2021

Could required os = linux added for test/jdk/java/nio/channels/FileChannel/BlockDeviceSize.java? As it is decribed only run as linux.

Sure, this is separate issue(https://bugs.openjdk.java.net/browse/JDK-8150539). We will fix it separately.

@AlanBateman
Copy link
Contributor

Could required os = linux added for test/jdk/java/nio/channels/FileChannel/BlockDeviceSize.java? As it is decribed only run as linux.

Yes, good idea. Also maybe we can see about changing it to avoid the dependency on /dev/sda1.

@vyommani
Copy link
Contributor Author

Could required os = linux added for test/jdk/java/nio/channels/FileChannel/BlockDeviceSize.java? As it is decribed only run as linux.

Sure, this is separate issue(https://bugs.openjdk.java.net/browse/JDK-8150539). We will fix it separately.

@vyommani
Copy link
Contributor Author

/integrate

@openjdk openjdk bot closed this May 10, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 10, 2021
@openjdk
Copy link

openjdk bot commented May 10, 2021

@vyommani Since your change was applied there have been 1241 commits pushed to the master branch:

  • 9b76955: 8266249: javax/swing/JPopupMenu/7156657/bug7156657.java fails on macOS
  • 3af4efd: 8265291: Error in Javadoc for doAccessibleAction API in AccessibleJSlider class
  • be4f25b: 8266369: (se) Add wepoll based Selector
  • ff77ca8: 8266675: Optimize IntHashTable for encapsulation and ease of use
  • 04fad70: 8266765: [BACKOUT] JDK-8255493 Support for pre-generated java.lang.invoke classes in CDS dynamic archive
  • 0790e60: 8196743: jstatd doesn't see new Java processes inside Docker container
  • c6aa8f1: 8232644: bugs in serialized-form.html
  • b5b3119: 8266589: (fs) Improve performance of Files.copy() on macOS using copyfile(3)
  • 947d69d: 8265042: javadoc HTML files not generated for types nested in records
  • 946b0fe: 8266645: javac should not check for sealed supertypes in intersection types
  • ... and 1231 more: https://git.openjdk.java.net/jdk/compare/34ae7aeb64db90dcb4d2f3d4acb16c714a32824f...master

Your commit was automatically rebased without conflicts.

Pushed as commit 69b96f9.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@dholmes-ora
Copy link
Member

@vyommani this has broken the build on macos as you are including a linux specific header file in non-linux code! Please backout or fix ASAP. Thanks.

@vyommani
Copy link
Contributor Author

I am working on it. i will provide fix ASAP.

@vyommani vyommani deleted the JDK-8266610 branch May 17, 2021 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

5 participants