Page MenuHomeFreeBSD

simplify interop with file_operations
ClosedPublic

Authored by mmacy on Feb 20 2019, 10:45 PM.
Tags
None
Referenced Files
F109381579: D19274.diff
Tue, Feb 4, 8:07 AM
Unknown Object (File)
Tue, Jan 28, 6:41 PM
Unknown Object (File)
Sun, Jan 26, 2:55 AM
Unknown Object (File)
Fri, Jan 24, 5:30 PM
Unknown Object (File)
Sat, Jan 18, 10:05 PM
Unknown Object (File)
Sat, Jan 18, 5:38 PM
Unknown Object (File)
Sun, Jan 12, 8:58 AM
Unknown Object (File)
Dec 26 2024, 12:48 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.