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)
Jan 24 2024, 10:09 AM
Unknown Object (File)
Dec 22 2023, 11:53 PM
Unknown Object (File)
Nov 20 2023, 7:59 AM
Unknown Object (File)
Nov 10 2023, 1:25 AM
Unknown Object (File)
Nov 2 2023, 4:30 PM
Unknown Object (File)
Oct 15 2023, 3:36 PM
Unknown Object (File)
Oct 12 2023, 10:47 PM
Unknown Object (File)
Oct 9 2023, 12:20 AM
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.