Skip to content
Snippets Groups Projects
  1. Mar 02, 2021
  2. Mar 01, 2021
    • Heinrich Schuchardt's avatar
      log: convert pr_*() to logging · e86ad666
      Heinrich Schuchardt authored and Tom Rini's avatar Tom Rini committed
      
      In drivers we use a family of printing functions including pr_err() and
      pr_cont(). CONFIG_LOGLEVEL is used to control which of these lead to output
      via printf().
      
      Our logging functions allow finer grained control of output. So replace
      printf() by the matching logging functions. The usage of CONFIG_LOGLEVEL
      remains unchanged.
      
      Signed-off-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      e86ad666
    • Marek Behún's avatar
      fs: btrfs: do not fail when offset of a ROOT_ITEM is not -1 · 1afb9f22
      Marek Behún authored and Tom Rini's avatar Tom Rini committed
      
      When the btrfs_read_fs_root() function is searching a ROOT_ITEM with
      location key offset other than -1, it currently fails via BUG_ON.
      
      The offset can have other value than -1, though. This can happen for
      example if a subvolume is renamed:
      
        $ btrfs subvolume create X && sync
        Create subvolume './X'
        $ btrfs inspect-internal dump-tree /dev/root | grep -B 2 'name: X$
              location key (270 ROOT_ITEM 18446744073709551615) type DIR
              transid 283 data_len 0 name_len 1
              name: X
        $ mv X Y && sync
        $ btrfs inspect-internal dump-tree /dev/root | grep -B 2 'name: Y$
              location key (270 ROOT_ITEM 0) type DIR
              transid 285 data_len 0 name_len 1
              name: Y
      
      As can be seen the offset changed from -1ULL to 0.
      
      Do not fail in this case.
      
      Signed-off-by: default avatarMarek Behún <marek.behun@nic.cz>
      Cc: David Sterba <dsterba@suse.com>
      Cc: Qu Wenruo <wqu@suse.com>
      Cc: Tom Rini <trini@konsulko.com>
      1afb9f22
  3. Feb 28, 2021
  4. Feb 27, 2021
  5. Feb 26, 2021
Loading