Does Linux have system calls to access all the features of the file systems it supports?2019 Community Moderator ElectionBirth is empty on ext4Can I set the “Archive” bit on a file on NTFS on Linux?Can I configure my Linux system for more aggressive file system caching?Which Linux file systems for USB sticks?what is inode for, in FreeBSD or SolarisHow to interact with the concrete file system?file system, archive bitDoes Linux uses the device files for the HDD partitions to access the HDD?Is the Virtual File System (VFS) a program or is it just an interface?How do I format an internal hard drive so that FreeBSD, Linux and Windows can all access it?How does memory mapping a file have significant performance increases over the standard I/O system calls?What is responsible for file permissions in a linux system?

validation vs test vs training accuracy, which one to compare for claiming overfit?

What Happens when Passenger Refuses to Fly Boeing 737 Max?

Force user to remove USB token

It's a yearly task, alright

Is King K. Rool's down throw to up-special a true combo?

Prove that the total distance is minimised (when travelling across the longest path)

A curious inequality concerning binomial coefficients

How is the Swiss post e-voting system supposed to work, and how was it wrong?

Why would a jet engine that runs at temps excess of 2000°C burn when it crashes?

Question about partial fractions with irreducible quadratic factors

what does the apostrophe mean in this notation?

Provisioning profile doesn't include the application-identifier and keychain-access-groups entitlements

Can you reject a postdoc offer after the PI has paid a large sum for flights/accommodation for your visit?

Excess Zinc in garden soil

Sword in the Stone story where the sword was held in place by electromagnets

What is the blue range indicating on this manifold pressure gauge?

Does the Bracer of Flying Daggers benefit from the Dueling Fighting style?

What is the likely impact on flights of grounding an entire aircraft series?

Why don't MCU characters ever seem to have language issues?

Running a subshell from the middle of the current command

Word for a person who has no opinion about whether god exists

Is it true that real estate prices mainly go up?

How does Dispel Magic work against Stoneskin?

Rejected in 4th interview round citing insufficient years of experience



Does Linux have system calls to access all the features of the file systems it supports?



2019 Community Moderator ElectionBirth is empty on ext4Can I set the “Archive” bit on a file on NTFS on Linux?Can I configure my Linux system for more aggressive file system caching?Which Linux file systems for USB sticks?what is inode for, in FreeBSD or SolarisHow to interact with the concrete file system?file system, archive bitDoes Linux uses the device files for the HDD partitions to access the HDD?Is the Virtual File System (VFS) a program or is it just an interface?How do I format an internal hard drive so that FreeBSD, Linux and Windows can all access it?How does memory mapping a file have significant performance increases over the standard I/O system calls?What is responsible for file permissions in a linux system?










3















Linux supports many file systems (for example: ext3, NTFS, FAT32, etc.).



The following diagram shows how Linux allows a process to access files:



enter image description here



So assume that a process called the read() system call to read a file, what will happen is that the VFS layer will be accessed, and the VFS layer will decide which file system driver to access based on the file system of the partition that the file to be read resides on.



Linux provides many system calls to access files (for example: read(), write(), rename(), etc.).



Now read() and write() and rename() work on all the file systems that Linux supports.



But there are specific features that exist only on some file systems while not existing on others. For example: on a NTFS file system, you can set the Archive bit for a file, while this can't be done on an ext3 file system.



Now my question is, does Linux have system calls to access all the features of the file systems it supports? for example: does Linux have a system call to set the Archive bit for a file on a NTFS file system?










share|improve this question







New contributor




user341642 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    3















    Linux supports many file systems (for example: ext3, NTFS, FAT32, etc.).



    The following diagram shows how Linux allows a process to access files:



    enter image description here



    So assume that a process called the read() system call to read a file, what will happen is that the VFS layer will be accessed, and the VFS layer will decide which file system driver to access based on the file system of the partition that the file to be read resides on.



    Linux provides many system calls to access files (for example: read(), write(), rename(), etc.).



    Now read() and write() and rename() work on all the file systems that Linux supports.



    But there are specific features that exist only on some file systems while not existing on others. For example: on a NTFS file system, you can set the Archive bit for a file, while this can't be done on an ext3 file system.



    Now my question is, does Linux have system calls to access all the features of the file systems it supports? for example: does Linux have a system call to set the Archive bit for a file on a NTFS file system?










    share|improve this question







    New contributor




    user341642 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      3












      3








      3








      Linux supports many file systems (for example: ext3, NTFS, FAT32, etc.).



      The following diagram shows how Linux allows a process to access files:



      enter image description here



      So assume that a process called the read() system call to read a file, what will happen is that the VFS layer will be accessed, and the VFS layer will decide which file system driver to access based on the file system of the partition that the file to be read resides on.



      Linux provides many system calls to access files (for example: read(), write(), rename(), etc.).



      Now read() and write() and rename() work on all the file systems that Linux supports.



      But there are specific features that exist only on some file systems while not existing on others. For example: on a NTFS file system, you can set the Archive bit for a file, while this can't be done on an ext3 file system.



      Now my question is, does Linux have system calls to access all the features of the file systems it supports? for example: does Linux have a system call to set the Archive bit for a file on a NTFS file system?










      share|improve this question







      New contributor




      user341642 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      Linux supports many file systems (for example: ext3, NTFS, FAT32, etc.).



      The following diagram shows how Linux allows a process to access files:



      enter image description here



      So assume that a process called the read() system call to read a file, what will happen is that the VFS layer will be accessed, and the VFS layer will decide which file system driver to access based on the file system of the partition that the file to be read resides on.



      Linux provides many system calls to access files (for example: read(), write(), rename(), etc.).



      Now read() and write() and rename() work on all the file systems that Linux supports.



      But there are specific features that exist only on some file systems while not existing on others. For example: on a NTFS file system, you can set the Archive bit for a file, while this can't be done on an ext3 file system.



      Now my question is, does Linux have system calls to access all the features of the file systems it supports? for example: does Linux have a system call to set the Archive bit for a file on a NTFS file system?







      linux filesystems






      share|improve this question







      New contributor




      user341642 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      user341642 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      user341642 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 2 hours ago









      user341642user341642

      161




      161




      New contributor




      user341642 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      user341642 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      user341642 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          1 Answer
          1






          active

          oldest

          votes


















          4















          does Linux have a system call to set the Archive bit for a file on a NTFS file system?




          For this particular case, the ntfs-3g driver exports the file attributes via extended attributes, see Can I set the "Archive" bit on a file on NTFS on Linux?



          The (V)FAT file system has the similar file attributes, but it uses an ioctl() function to access them, see ioctl_fat(2). (ioctl() is a sort of a multipurpose system call, used for all kinds of device specific stuff that don't warrant a real system call.)




          Now my question is, does Linux have system calls to access all the features of the file systems it supports?




          It's hard to answer for sure, but there has been at least one example of the opposite. ext4 internally supports a "birth time" timestamp for files (like, a real creation time, unlike ctime that changes on inode modification). But even though ext4 is the "standard" filesystem, for a long time, there was no system call to access the birth time.



          It should be supported now, with the statx() system call added in Linux 4.11, in April 2017.



          Related:



          • Birth is empty on ext4

          • A number of articles on lwn.net about statx, including e.g. statx() v3





          share|improve this answer




















          • 1





            ntfs != fat. At least the kernel version of ntfs does NOT have any way to set or get the archive flag, though its headers define it. Only the fuse based ntfs-3g seems to support it (via extended attributes, not special ioctls).

            – Uncle Billy
            2 hours ago












          • This isn’t directly related to the question, but as a complement to your mention of statx, it’s now supported in the C library and in the latest version of coreutils which was released a few days ago.

            – Stephen Kitt
            2 hours ago











          • @UncleBilly, d'oh, apparently I can't read, but just automatically thought of (v)fat. Thanks for noticing that, I'll see if I can find a more appropriate reference.

            – ilkkachu
            2 hours ago










          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          user341642 is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f506160%2fdoes-linux-have-system-calls-to-access-all-the-features-of-the-file-systems-it-s%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          4















          does Linux have a system call to set the Archive bit for a file on a NTFS file system?




          For this particular case, the ntfs-3g driver exports the file attributes via extended attributes, see Can I set the "Archive" bit on a file on NTFS on Linux?



          The (V)FAT file system has the similar file attributes, but it uses an ioctl() function to access them, see ioctl_fat(2). (ioctl() is a sort of a multipurpose system call, used for all kinds of device specific stuff that don't warrant a real system call.)




          Now my question is, does Linux have system calls to access all the features of the file systems it supports?




          It's hard to answer for sure, but there has been at least one example of the opposite. ext4 internally supports a "birth time" timestamp for files (like, a real creation time, unlike ctime that changes on inode modification). But even though ext4 is the "standard" filesystem, for a long time, there was no system call to access the birth time.



          It should be supported now, with the statx() system call added in Linux 4.11, in April 2017.



          Related:



          • Birth is empty on ext4

          • A number of articles on lwn.net about statx, including e.g. statx() v3





          share|improve this answer




















          • 1





            ntfs != fat. At least the kernel version of ntfs does NOT have any way to set or get the archive flag, though its headers define it. Only the fuse based ntfs-3g seems to support it (via extended attributes, not special ioctls).

            – Uncle Billy
            2 hours ago












          • This isn’t directly related to the question, but as a complement to your mention of statx, it’s now supported in the C library and in the latest version of coreutils which was released a few days ago.

            – Stephen Kitt
            2 hours ago











          • @UncleBilly, d'oh, apparently I can't read, but just automatically thought of (v)fat. Thanks for noticing that, I'll see if I can find a more appropriate reference.

            – ilkkachu
            2 hours ago















          4















          does Linux have a system call to set the Archive bit for a file on a NTFS file system?




          For this particular case, the ntfs-3g driver exports the file attributes via extended attributes, see Can I set the "Archive" bit on a file on NTFS on Linux?



          The (V)FAT file system has the similar file attributes, but it uses an ioctl() function to access them, see ioctl_fat(2). (ioctl() is a sort of a multipurpose system call, used for all kinds of device specific stuff that don't warrant a real system call.)




          Now my question is, does Linux have system calls to access all the features of the file systems it supports?




          It's hard to answer for sure, but there has been at least one example of the opposite. ext4 internally supports a "birth time" timestamp for files (like, a real creation time, unlike ctime that changes on inode modification). But even though ext4 is the "standard" filesystem, for a long time, there was no system call to access the birth time.



          It should be supported now, with the statx() system call added in Linux 4.11, in April 2017.



          Related:



          • Birth is empty on ext4

          • A number of articles on lwn.net about statx, including e.g. statx() v3





          share|improve this answer




















          • 1





            ntfs != fat. At least the kernel version of ntfs does NOT have any way to set or get the archive flag, though its headers define it. Only the fuse based ntfs-3g seems to support it (via extended attributes, not special ioctls).

            – Uncle Billy
            2 hours ago












          • This isn’t directly related to the question, but as a complement to your mention of statx, it’s now supported in the C library and in the latest version of coreutils which was released a few days ago.

            – Stephen Kitt
            2 hours ago











          • @UncleBilly, d'oh, apparently I can't read, but just automatically thought of (v)fat. Thanks for noticing that, I'll see if I can find a more appropriate reference.

            – ilkkachu
            2 hours ago













          4












          4








          4








          does Linux have a system call to set the Archive bit for a file on a NTFS file system?




          For this particular case, the ntfs-3g driver exports the file attributes via extended attributes, see Can I set the "Archive" bit on a file on NTFS on Linux?



          The (V)FAT file system has the similar file attributes, but it uses an ioctl() function to access them, see ioctl_fat(2). (ioctl() is a sort of a multipurpose system call, used for all kinds of device specific stuff that don't warrant a real system call.)




          Now my question is, does Linux have system calls to access all the features of the file systems it supports?




          It's hard to answer for sure, but there has been at least one example of the opposite. ext4 internally supports a "birth time" timestamp for files (like, a real creation time, unlike ctime that changes on inode modification). But even though ext4 is the "standard" filesystem, for a long time, there was no system call to access the birth time.



          It should be supported now, with the statx() system call added in Linux 4.11, in April 2017.



          Related:



          • Birth is empty on ext4

          • A number of articles on lwn.net about statx, including e.g. statx() v3





          share|improve this answer
















          does Linux have a system call to set the Archive bit for a file on a NTFS file system?




          For this particular case, the ntfs-3g driver exports the file attributes via extended attributes, see Can I set the "Archive" bit on a file on NTFS on Linux?



          The (V)FAT file system has the similar file attributes, but it uses an ioctl() function to access them, see ioctl_fat(2). (ioctl() is a sort of a multipurpose system call, used for all kinds of device specific stuff that don't warrant a real system call.)




          Now my question is, does Linux have system calls to access all the features of the file systems it supports?




          It's hard to answer for sure, but there has been at least one example of the opposite. ext4 internally supports a "birth time" timestamp for files (like, a real creation time, unlike ctime that changes on inode modification). But even though ext4 is the "standard" filesystem, for a long time, there was no system call to access the birth time.



          It should be supported now, with the statx() system call added in Linux 4.11, in April 2017.



          Related:



          • Birth is empty on ext4

          • A number of articles on lwn.net about statx, including e.g. statx() v3






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 hours ago

























          answered 2 hours ago









          ilkkachuilkkachu

          61.1k1099175




          61.1k1099175







          • 1





            ntfs != fat. At least the kernel version of ntfs does NOT have any way to set or get the archive flag, though its headers define it. Only the fuse based ntfs-3g seems to support it (via extended attributes, not special ioctls).

            – Uncle Billy
            2 hours ago












          • This isn’t directly related to the question, but as a complement to your mention of statx, it’s now supported in the C library and in the latest version of coreutils which was released a few days ago.

            – Stephen Kitt
            2 hours ago











          • @UncleBilly, d'oh, apparently I can't read, but just automatically thought of (v)fat. Thanks for noticing that, I'll see if I can find a more appropriate reference.

            – ilkkachu
            2 hours ago












          • 1





            ntfs != fat. At least the kernel version of ntfs does NOT have any way to set or get the archive flag, though its headers define it. Only the fuse based ntfs-3g seems to support it (via extended attributes, not special ioctls).

            – Uncle Billy
            2 hours ago












          • This isn’t directly related to the question, but as a complement to your mention of statx, it’s now supported in the C library and in the latest version of coreutils which was released a few days ago.

            – Stephen Kitt
            2 hours ago











          • @UncleBilly, d'oh, apparently I can't read, but just automatically thought of (v)fat. Thanks for noticing that, I'll see if I can find a more appropriate reference.

            – ilkkachu
            2 hours ago







          1




          1





          ntfs != fat. At least the kernel version of ntfs does NOT have any way to set or get the archive flag, though its headers define it. Only the fuse based ntfs-3g seems to support it (via extended attributes, not special ioctls).

          – Uncle Billy
          2 hours ago






          ntfs != fat. At least the kernel version of ntfs does NOT have any way to set or get the archive flag, though its headers define it. Only the fuse based ntfs-3g seems to support it (via extended attributes, not special ioctls).

          – Uncle Billy
          2 hours ago














          This isn’t directly related to the question, but as a complement to your mention of statx, it’s now supported in the C library and in the latest version of coreutils which was released a few days ago.

          – Stephen Kitt
          2 hours ago





          This isn’t directly related to the question, but as a complement to your mention of statx, it’s now supported in the C library and in the latest version of coreutils which was released a few days ago.

          – Stephen Kitt
          2 hours ago













          @UncleBilly, d'oh, apparently I can't read, but just automatically thought of (v)fat. Thanks for noticing that, I'll see if I can find a more appropriate reference.

          – ilkkachu
          2 hours ago





          @UncleBilly, d'oh, apparently I can't read, but just automatically thought of (v)fat. Thanks for noticing that, I'll see if I can find a more appropriate reference.

          – ilkkachu
          2 hours ago










          user341642 is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          user341642 is a new contributor. Be nice, and check out our Code of Conduct.












          user341642 is a new contributor. Be nice, and check out our Code of Conduct.











          user341642 is a new contributor. Be nice, and check out our Code of Conduct.














          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f506160%2fdoes-linux-have-system-calls-to-access-all-the-features-of-the-file-systems-it-s%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Are there any AGPL-style licences that require source code modifications to be public? Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Force derivative works to be publicAre there any GPL like licenses for Apple App Store?Do you violate the GPL if you provide source code that cannot be compiled?GPL - is it distribution to use libraries in an appliance loaned to customers?Distributing App for free which uses GPL'ed codeModifications of server software under GPL, with web/CLI interfaceDoes using an AGPLv3-licensed library prevent me from dual-licensing my own source code?Can I publish only select code under GPLv3 from a private project?Is there published precedent regarding the scope of covered work that uses AGPL software?If MIT licensed code links to GPL licensed code what should be the license of the resulting binary program?If I use a public API endpoint that has its source code licensed under AGPL in my app, do I need to disclose my source?

          2013 GY136 Descoberta | Órbita | Referências Menu de navegação«List Of Centaurs and Scattered-Disk Objects»«List of Known Trans-Neptunian Objects»

          Button changing it's text & action. Good or terrible? The 2019 Stack Overflow Developer Survey Results Are Inchanging text on user mouseoverShould certain functions be “hard to find” for powerusers to discover?Custom liking function - do I need user login?Using different checkbox style for different checkbox behaviorBest Practices: Save and Exit in Software UIInteraction with remote validated formMore efficient UI to progress the user through a complicated process?Designing a popup notice for a gameShould bulk-editing functions be hidden until a table row is selected, or is there a better solution?Is it bad practice to disable (replace) the context menu?