Skip to content
Snippets Groups Projects
Select Git revision
  • 19c6e12c07ceab2ff5d5ec97354b893ab386c41c
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

inode.c

Blame
  • inode.c 65.38 KiB
    /*
     * inode.c
     *
     * PURPOSE
     *  Inode handling routines for the OSTA-UDF(tm) filesystem.
     *
     * COPYRIGHT
     *  This file is distributed under the terms of the GNU General Public
     *  License (GPL). Copies of the GPL can be obtained from:
     *    ftp://prep.ai.mit.edu/pub/gnu/GPL
     *  Each contributing author retains all rights to their own work.
     *
     *  (C) 1998 Dave Boynton
     *  (C) 1998-2004 Ben Fennema
     *  (C) 1999-2000 Stelias Computing Inc
     *
     * HISTORY
     *
     *  10/04/98 dgb  Added rudimentary directory functions
     *  10/07/98      Fully working udf_block_map! It works!
     *  11/25/98      bmap altered to better support extents
     *  12/06/98 blf  partition support in udf_iget, udf_block_map
     *                and udf_read_inode
     *  12/12/98      rewrote udf_block_map to handle next extents and descs across
     *                block boundaries (which is not actually allowed)
     *  12/20/98      added support for strategy 4096
     *  03/07/99      rewrote udf_block_map (again)
     *                New funcs, inode_bmap, udf_next_aext
     *  04/19/99      Support for writing device EA's for major/minor #
     */
    
    #include "udfdecl.h"
    #include <linux/mm.h>
    #include <linux/module.h>
    #include <linux/pagemap.h>
    #include <linux/writeback.h>
    #include <linux/slab.h>
    #include <linux/crc-itu-t.h>
    #include <linux/mpage.h>
    #include <linux/uio.h>
    #include <linux/bio.h>
    
    #include "udf_i.h"
    #include "udf_sb.h"
    
    #define EXTENT_MERGE_SIZE 5
    
    static umode_t udf_convert_permissions(struct fileEntry *);
    static int udf_update_inode(struct inode *, int);
    static int udf_sync_inode(struct inode *inode);
    static int udf_alloc_i_data(struct inode *inode, size_t size);
    static sector_t inode_getblk(struct inode *, sector_t, int *, int *);
    static int8_t udf_insert_aext(struct inode *, struct extent_position,
    			      struct kernel_lb_addr, uint32_t);
    static void udf_split_extents(struct inode *, int *, int, int,
    			      struct kernel_long_ad *, int *);
    static void udf_prealloc_extents(struct inode *, int, int,
    				 struct kernel_long_ad *, int *);
    static void udf_merge_extents(struct inode *, struct kernel_long_ad *, int *);
    static void udf_update_extents(struct inode *, struct kernel_long_ad *, int,
    			       int, struct extent_position *);
    static int udf_get_block(struct inode *, sector_t, struct buffer_head *, int);
    
    static void __udf_clear_extent_cache(struct inode *inode)
    {
    	struct udf_inode_info *iinfo = UDF_I(inode);
    
    	if (iinfo->cached_extent.lstart != -1) {
    		brelse(iinfo->cached_extent.epos.bh);
    		iinfo->cached_extent.lstart = -1;