Skip to content

PATCH - Providing fullfsync on supported platforms #47767

Closed

Description

@icharnas
mannequin
BPO 3517
Nosy @gvanrossum
Files
  • fullfsync.patch
  • fullfsync_fcntl.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2008-08-07.18:52:10.649>
    created_at = <Date 2008-08-07.17:31:59.099>
    labels = ['type-bug', 'library']
    title = 'PATCH - Providing fullfsync on supported platforms'
    updated_at = <Date 2008-08-07.18:52:10.648>
    user = 'https://bugs.python.org/icharnas'

    bugs.python.org fields:

    activity = <Date 2008-08-07.18:52:10.648>
    actor = 'gvanrossum'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-08-07.18:52:10.649>
    closer = 'gvanrossum'
    components = ['Library (Lib)']
    creation = <Date 2008-08-07.17:31:59.099>
    creator = 'icharnas'
    dependencies = []
    files = ['11072', '11074']
    hgrepos = []
    issue_num = 3517
    keywords = ['patch']
    message_count = 4.0
    messages = ['70842', '70847', '70849', '70851']
    nosy_count = 2.0
    nosy_names = ['gvanrossum', 'icharnas']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue3517'
    versions = ['Python 2.6']

    Activity

    1. icharnas commented on Aug 7, 2008

      icharnasmannequin
      MannequinAuthor

      Python currently provides os.fsync to call the POSIX 'fsync' on
      platforms that support it. While this function forces the operating
      system to force a file buffer to the storage device, data may still be
      waiting in the hardware write buffers on the storage device. Certain
      platforms (so far, only OS X) provide "fullfsync" [1] to request that
      storage devices flush their write buffers to the actual physical media.

      This functionality is especially useful to VCS and DB developers, and
      already appears in SQLite [2] and MySQL [3], amongst others.

      This patch includes code changes to Modules/posixmodule.c that exposes
      os.fullfsync on supported platforms, including the appropriate
      documentation added to Doc/library/os.rst

      -Ian Charnas

      [1] Discussion of fsync and fullfsync on darwin platform:
      http://lists.apple.com/archives/darwin-dev/2005/Feb/msg00072.html

      [2] SQLite uses fullfsync on all platforms that define it:
      http://www.sqlite.org/cvstrac/fileview?f=sqlite/src/os_unix.c

      [3] MySQL uses fullfsync only on the darwin platform and only when
      F_FULLFSYNC is defined as 51, which seems to be short-sighted in that
      this symbol may change value in future versions of OS X. To see this
      code, download a mysql 5.x source snapshot and open up
      mysql-<version-number>/innobase/os/os0file.c

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Aug 7, 2008
    3. gvanrossum commented on Aug 7, 2008

      @gvanrossum
      Member

      I'm sorry to have lead you this way, but since there is no fullfsync()
      system call, IMO you should just make the F_FULLFSYNC constant
      available. That should go into fcntlmodule.c.

    4. icharnas commented on Aug 7, 2008

      icharnasmannequin
      MannequinAuthor

      Sounds fair enough. I was looking forward to the glitz and glamor of
      the os module, but I'll settle for a good seat in fcntl. Here's a patch
      implementing just that.

      -ian

    5. gvanrossum commented on Aug 7, 2008

      @gvanrossum
      Member

      Thanks, checked into the trunk as r65581.

    6. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions