1. 30 4月, 2013 2 次提交
  2. 23 2月, 2013 1 次提交
  3. 31 7月, 2012 1 次提交
  4. 30 5月, 2012 1 次提交
  5. 01 4月, 2012 1 次提交
  6. 04 1月, 2012 2 次提交
  7. 17 11月, 2011 1 次提交
  8. 01 6月, 2011 1 次提交
  9. 25 5月, 2011 4 次提交
    • T
      Ocfs2/move_extents: move/defrag extents within a certain range. · 53069d4e
      Tristan Ye 提交于
      the basic logic of moving extents for a file is pretty like punching-hole
      sequence, walk the extents within the range as user specified, calculating
      an appropriate len to defrag/move, then let ocfs2_defrag/move_extent() to
      do the actual moving.
      
      This func ends up setting 'OCFS2_MOVE_EXT_FL_COMPLETE' to userpace if operation
      gets done successfully.
      Signed-off-by: NTristan Ye <tristan.ye@oracle.com>
      53069d4e
    • T
      Ocfs2: Add a new code 'OCFS2_INFO_FREEFRAG' for o2info ioctl. · d24a10b9
      Tristan Ye 提交于
      This new code is a bit more complicated than former ones, the goal is to
      show user all statistics required to take a deep insight into filesystem
      on how the disk is being fragmentaed.
      
      The goal is achieved by scaning global bitmap from (cluster)group to group
      to figure out following factors in the filesystem:
      
              - How many free chunks in a fixed size as user requested.
              - How many real free chunks in all size.
              - Min/Max/Avg size(in) clusters of free chunks.
              - How do free chunks distribute(in size) in terms of a histogram,
                just like following:
                ---------------------------------------------------------
                Extent Size Range :  Free extents  Free Clusters  Percent
                   32K...   64K-  :             1             1    0.00%
                    1M...    2M-  :             9           288    0.03%
                    8M...   16M-  :             2           831    0.09%
                   32M...   64M-  :             1          2047    0.23%
                  128M...  256M-  :             1          8191    0.92%
                  256M...  512M-  :             2         21706    2.43%
                  512M... 1024M-  :            27        858623   96.29%
                ---------------------------------------------------------
      
      Userspace ioctl() call eventually gets the above info returned by passing
      a 'struct ocfs2_info_freefrag' with the chunk_size being specified first.
      Signed-off-by: NTristan Ye <tristan.ye@oracle.com>
      d24a10b9
    • T
      Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl. · 3e5db17d
      Tristan Ye 提交于
      The new code is dedicated to calculate free inodes number of all inode_allocs,
      then return the info to userpace in terms of an array.
      
      Specially, flag 'OCFS2_INFO_FL_NON_COHERENT', manipulated by '--cluster-coherent'
      from userspace, is now going to be involved. setting the flag on means no cluster
      coherency considered, usually, userspace tools choose none-coherency strategy by
      default for the sake of performace.
      Signed-off-by: NTristan Ye <tristan.ye@oracle.com>
      3e5db17d
    • T
      Ocfs2: Using inline funcs to set/clear *FILLED* flags in info handler. · 8aa1fa36
      Tristan Ye 提交于
      It just removes some macros for the sake of typechecking gains.
      Signed-off-by: NTristan Ye <tristan.ye@oracle.com>
      8aa1fa36
  10. 24 5月, 2011 1 次提交
  11. 24 3月, 2011 1 次提交
  12. 21 2月, 2011 1 次提交
  13. 07 3月, 2011 1 次提交
    • T
      ocfs2: Remove EXIT from masklog. · c1e8d35e
      Tao Ma 提交于
      mlog_exit is used to record the exit status of a function.
      But because it is added in so many functions, if we enable it,
      the system logs get filled up quickly and cause too much I/O.
      So actually no one can open it for a production system or even
      for a test.
      
      This patch just try to remove it or change it. So:
      1. if all the error paths already use mlog_errno, it is just removed.
         Otherwise, it will be replaced by mlog_errno.
      2. if it is used to print some return value, it is replaced with
         mlog(0,...).
      mlog_exit_ptr is changed to mlog(0.
      All those mlog(0,...) will be replaced with trace events later.
      Signed-off-by: NTao Ma <boyu.mt@taobao.com>
      c1e8d35e
  14. 20 2月, 2011 1 次提交
  15. 10 9月, 2010 1 次提交
    • T
      Ocfs2: Add new OCFS2_IOC_INFO ioctl for ocfs2 v8. · ddee5cdb
      Tristan Ye 提交于
      The reason why we need this ioctl is to offer the none-privileged
      end-user a possibility to get filesys info gathering.
      
      We use OCFS2_IOC_INFO to manipulate the new ioctl, userspace passes a
      structure to kernel containing an array of request pointers and request
      count, such as,
      
      * From userspace:
      
      struct ocfs2_info_blocksize oib = {
              .ib_req = {
                      .ir_magic = OCFS2_INFO_MAGIC,
                      .ir_code = OCFS2_INFO_BLOCKSIZE,
                      ...
              }
              ...
      }
      
      struct ocfs2_info_clustersize oic = {
              ...
      }
      
      uint64_t reqs[2] = {(unsigned long)&oib,
                          (unsigned long)&oic};
      
      struct ocfs2_info info = {
              .oi_requests = reqs,
              .oi_count = 2,
      }
      
      ret = ioctl(fd, OCFS2_IOC_INFO, &info);
      
      * In kernel:
      
      Get the request pointers from *info*, then handle each request one bye one.
      
      Idea here is to make the spearated request small enough to guarantee
      a better backward&forward compatibility since a small piece of request
      would be less likely to be broken if filesys on raw disk get changed.
      
      Currently, the following 7 requests are supported per the requirement from
      userspace tool o2info, and I believe it will grow over time:-)
      
              OCFS2_INFO_CLUSTERSIZE
              OCFS2_INFO_BLOCKSIZE
              OCFS2_INFO_MAXSLOTS
              OCFS2_INFO_LABEL
              OCFS2_INFO_UUID
              OCFS2_INFO_FS_FEATURES
              OCFS2_INFO_JOURNAL_SIZE
      
      This ioctl is only specific to OCFS2.
      Signed-off-by: NTristan Ye <tristan.ye@oracle.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      ddee5cdb
  16. 03 2月, 2010 1 次提交
  17. 23 9月, 2009 1 次提交
  18. 13 7月, 2009 1 次提交
  19. 14 10月, 2008 1 次提交
  20. 19 4月, 2008 1 次提交
  21. 18 4月, 2008 2 次提交
  22. 26 1月, 2008 4 次提交
  23. 18 7月, 2007 1 次提交
    • S
      Introduce is_owner_or_cap() to wrap CAP_FOWNER use with fsuid check · 3bd858ab
      Satyam Sharma 提交于
      Introduce is_owner_or_cap() macro in fs.h, and convert over relevant
      users to it. This is done because we want to avoid bugs in the future
      where we check for only effective fsuid of the current task against a
      file's owning uid, without simultaneously checking for CAP_FOWNER as
      well, thus violating its semantics.
      [ XFS uses special macros and structures, and in general looked ...
      untouchable, so we leave it alone -- but it has been looked over. ]
      
      The (current->fsuid != inode->i_uid) check in generic_permission() and
      exec_permission_lite() is left alone, because those operations are
      covered by CAP_DAC_OVERRIDE and CAP_DAC_READ_SEARCH. Similarly operations
      falling under the purview of CAP_CHOWN and CAP_LEASE are also left alone.
      Signed-off-by: NSatyam Sharma <ssatyam@cse.iitk.ac.in>
      Cc: Al Viro <viro@ftp.linux.org.uk>
      Acked-by: NSerge E. Hallyn <serge@hallyn.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3bd858ab
  24. 11 7月, 2007 1 次提交
    • M
      ocfs2: Support xfs style space reservation ioctls · b2580103
      Mark Fasheh 提交于
      We re-use the RESVSP/UNRESVSP ioctls from xfs which allow the user to
      allocate and deallocate regions to a file without zeroing data or changing
      i_size.
      
      Though renamed, the structure passed in from user is identical to struct
      xfs_flock64. The three fields that are actually used right now are l_whence,
      l_start and l_len.
      
      This should get ocfs2 immediate compatibility with userspace software using
      the pre-existing xfs ioctls.
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      b2580103
  25. 03 5月, 2007 2 次提交
  26. 02 12月, 2006 4 次提交
  27. 21 9月, 2006 1 次提交