Bug 181012 - [linux] [patch] Implemented linux system call fstatfs64
Summary: [linux] [patch] Implemented linux system call fstatfs64
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dmitry Chagin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-04 11:50 UTC by yuri
Modified: 2016-03-27 06:40 UTC (History)
2 users (show)

See Also:


Attachments
file.txt (4.80 KB, text/plain)
2013-08-04 11:50 UTC, yuri
no flags Details
Alternative patch for missing linux system call (1.95 KB, patch)
2016-03-20 01:04 UTC, john
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description yuri 2013-08-04 11:50:00 UTC
This patch implements linux call fstatfs64.
Patch also fixes the problem when linux call fstatfs would return wrong values when actual FS stat value(s) are large enough to not fit into 32 bits.
Patch is against rev.251126

Please also merge it into 9.X stable branch.

Fix: Patch attached with submission follows:
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2013-08-04 16:09:02 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-emulation

Over to maintainer(s).
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2013-08-04 22:12:20 UTC
Please hold off on this, I will submit wider patch with several other 
linux calls included.
Comment 3 Dmitry Chagin freebsd_committer freebsd_triage 2016-01-17 15:39:31 UTC
take
Comment 4 john 2016-03-20 01:03:20 UTC
I also encountered the missing fstatfs64 ... specifically running linux FireFox
17.0.11 ESR on Freebsd 10 stable results in the kernel complaining:

  linux: pid 66972 (mozStorage #6): syscall fstatfs64 not implemented

when using the browser to download a file.  Attached is the patch I'm currently
using which merely addresses the missing system call.
Comment 5 john 2016-03-20 01:04:25 UTC
Created attachment 168416 [details]
Alternative patch for missing linux system  call
Comment 6 commit-hook freebsd_committer freebsd_triage 2016-03-20 13:22:11 UTC
A commit references this bug:

Author: dchagin
Date: Sun Mar 20 13:21:20 UTC 2016
New revision: 297061
URL: https://svnweb.freebsd.org/changeset/base/297061

Log:
  Implement fstatfs64 system call.

  PR:		181012
  Submitted by:	John Wehle
  MFC after:	1 week

Changes:
  head/sys/amd64/linux32/linux32_dummy.c
  head/sys/amd64/linux32/syscalls.master
  head/sys/compat/linux/linux_stats.c
  head/sys/i386/linux/linux_dummy.c
  head/sys/i386/linux/syscalls.master
Comment 7 commit-hook freebsd_committer freebsd_triage 2016-03-20 18:31:44 UTC
A commit references this bug:

Author: dchagin
Date: Sun Mar 20 18:31:31 UTC 2016
New revision: 297070
URL: https://svnweb.freebsd.org/changeset/base/297070

Log:
  Return EOVERFLOW in case when actual statfs values are large enough and
  not fit into 32 bit fileds of a Linux struct statfs.

  PR:		181012
  MFC after:	1 week

Changes:
  head/sys/compat/linux/linux_stats.c
Comment 8 commit-hook freebsd_committer freebsd_triage 2016-03-27 06:11:38 UTC
A commit references this bug:

Author: dchagin
Date: Sun Mar 27 06:10:52 UTC 2016
New revision: 297300
URL: https://svnweb.freebsd.org/changeset/base/297300

Log:
  MFC r297061;

  Implement fstatfs64 system call.

  PR:		181012
  Submitted by:	John Wehle

Changes:
_U  stable/10/
  stable/10/sys/amd64/linux32/linux32_dummy.c
  stable/10/sys/amd64/linux32/syscalls.master
  stable/10/sys/compat/linux/linux_stats.c
  stable/10/sys/i386/linux/linux_dummy.c
  stable/10/sys/i386/linux/syscalls.master
Comment 9 Dmitry Chagin freebsd_committer freebsd_triage 2016-03-27 06:40:45 UTC
stable/9 is ignored since a lot of changes have been merged only into stable/10