How to find the inode of the file, a buffer/block belongs to?

From: Vineet Joglekar (vinzip_at_indiatimes.com)
Date: 06/10/04

  • Next message: Richard Harter: "Re: Creating an operating system"
    Date: 10 Jun 2004 14:06:58 -0700
    
    

    Hi all,

    There is a parameter "b_inode" in the struct "buffer_head", which I
    was under the impression; points to the inode of the file, that
    buffer/block belongs to. But when I print it, it just shows "0" Can
    anyone please tell me whats the significance of this parameter? and
    how to find which file that buffer / block belongs to?

    Also, I am under the impression that a buffer (in normal conditions)
    can be allocated to just 1 file at a time while in a page, different
    buffers in that same page can be allocated to different files. please
    correct me if I am wrong.

    Thanks and regards,

    Vineet

    p.s. I am trying to print this "b_inode" in a function
    "do_generic_file_read" in the file /mm/filemap.c


  • Next message: Richard Harter: "Re: Creating an operating system"

    Relevant Pages

    • Re: Secure C library
      ... > Bos) wrote: ... >>daw@xxxxxxxxxxxxxxxxxxxxxxxx (David Wagner) wrote: ... >>This is exactly the impression that it makes on me. ... > ISTM the point is what happens if the user passes a buffer _smaller_ ...
      (comp.std.c)
    • [PATCH] Make /proc/sys/vm/drop_caches write only
      ... disable the cache. ... The ability to read the value written to this file long ... back gives wrong impression. ... proc_dointvec_minmax(table, write, file, buffer, length, ppos); ...
      (Linux-Kernel)
    • Re: [PATCH RFC] ext3 data=guarded v6
      ... Fixup locking while deleting an orphan entry. ... Fixup O_DIRCECT disk i_size updates ... buffer onto a list of things that must be written before a commit. ... When we start tracking guarded buffers on a given inode, ...
      (Linux-Kernel)
    • [PATCH RFC] ext3 data=guarded v6
      ... Fixup locking while deleting an orphan entry. ... Fixup O_DIRCECT disk i_size updates ... buffer onto a list of things that must be written before a commit. ... When we start tracking guarded buffers on a given inode, ...
      (Linux-Kernel)
    • [PATCH RFC] ext3 data=guarded v7
      ... buffer onto a list of things that must be written before a commit. ... a workqueue where the real work of updating the on disk i_size is done. ... When we start tracking guarded buffers on a given inode, ... void ext3_delete_inode (struct inode * inode) ...
      (Linux-Kernel)