Page MenuHomeFreeBSD

simplify interop with file_operations
ClosedPublic

Authored by mmacy on Feb 20 2019, 10:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 4, 7:31 AM
Unknown Object (File)
Tue, Nov 26, 6:24 PM
Unknown Object (File)
Nov 19 2024, 6:36 AM
Unknown Object (File)
Nov 15 2024, 8:38 AM
Unknown Object (File)
Oct 26 2024, 2:18 AM
Unknown Object (File)
Oct 26 2024, 1:03 AM
Unknown Object (File)
Oct 18 2024, 1:23 PM
Unknown Object (File)
Oct 5 2024, 11:41 PM
Subscribers

Details

Summary

There are a couple of issues

  • loff_t is defined as long long on Linux. On FreeBSD it's defined as long. For all intents and purposes we only care about 64-bit so we'll just pretend like that always DTRT. It would be easier to interoperate with FreeBSD code if we just used off_t. I could go either way and convert the debugfs consumer back to using loff_t if we agree to actually use the type Linux uses.
  • struct linux_file is what we actually pass around, using struct file and redefining it leads to conflicts in build, let's just use linux_file.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Did you do a LINT build to make sure nothing gets broken by this patch for both i386 and amd64?

If you grep for llseek you'll see it is used a couple of places in sys/ofed .

If you grep for llseek you'll see it is used a couple of places in sys/ofed .

I will do a make tinderbox for the two

  • update to fix LINT

Build works now giving loff_t a correct definition (negative offsets are possible)

This revision is now accepted and ready to land.Feb 23 2019, 11:11 AM
This revision was automatically updated to reflect the committed changes.