1. 26 Jan, 2023 8 commits
    • Jan Kara's avatar
      udf: Use udf_bread() in udf_get_pblock_virt15() · 4215db46
      Jan Kara authored
      Use udf_bread() instead of mapping and reading buffer head manually in
      udf_get_pblock_virt15().
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      4215db46
    • Jan Kara's avatar
      udf: Factor out block mapping into udf_map_block() · f3a30be7
      Jan Kara authored
      Create new block mapping function udf_map_block() that takes new
      udf_map_rq structure describing mapping request. We will convert other
      places to use this function for block mapping.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      f3a30be7
    • Jan Kara's avatar
      udf: Move incrementing of goal block directly into inode_getblk() · de80dae0
      Jan Kara authored
      inode_getblk() sets goal block for the next allocation to the currently
      allocated block. This is obviously one less than what the goal block
      should be which we fixup in udf_get_block(). Just set the right goal
      block directly in inode_getblk().
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      de80dae0
    • Jan Kara's avatar
      udf: Drop VARCONV support · 101ee137
      Jan Kara authored
      UDF was supporting a strange mode where the media was containing 7
      blocks of unknown data for every 32 blocks of the filesystem. I have yet
      to see the media that would need such conversion (maybe it comes from
      packet writing times) and the conversions have been inconsistent in the
      code. In particular any write will write to a wrong block and corrupt
      the media. This is an indication and no user actually needs this so
      let's just drop the support instead of trying to fix it.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      101ee137
    • Jan Kara's avatar
      udf: Unify types in anchor block detection · bd904f3c
      Jan Kara authored
      When detecting last recorded block and from it derived anchor block
      position, we were mixing unsigned long, u32, and sector_t types. Since
      udf supports only 32-bit block numbers this is harmless but sometimes
      makes things awkward. Convert everything to udf_pblk_t and also handle
      the situation when block device size would not fit into udf_pblk_t.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      bd904f3c
    • Jan Kara's avatar
      udf: Fix directory iteration for longer tail extents · 1ea1cd11
      Jan Kara authored
      When directory's last extent has more that one block and its length is
      not multiple of a block side, the code wrongly decided to move to the
      next extent instead of processing the last partial block. This led to
      directory corruption. Fix the rounding issue.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      1ea1cd11
    • Jan Kara's avatar
      udf: Propagate errors from udf_advance_blk() · ee454ad2
      Jan Kara authored
      When we spot directory corruption when trying to load next directory
      extent, we didn't propagate the error up properly, leading to possibly
      indefinite looping on corrupted directories. Fix the problem by
      propagating the error properly.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      ee454ad2
    • Jan Kara's avatar
      udf: Zero udf name padding · 3bea4ae1
      Jan Kara authored
      Padding of name in the directory entry needs to be zeroed out. Fix it.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      3bea4ae1
  2. 16 Jan, 2023 1 commit
  3. 09 Jan, 2023 31 commits