All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilan Schwarts <ilan84@gmail.com>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Fwd: Fwd: Question regarding to Btrfs patchwork /2831525
Date: Sun, 14 Jan 2018 10:33:10 +0200	[thread overview]
Message-ID: <CAJUuSvFUFnxuoXDE0+ykTXYN4B4GOWps7rAYAiHom6NKMX2nFA@mail.gmail.com> (raw)
In-Reply-To: <CAJUuSvHpP-GV50P9dDJxX-WyzqtoHZLiuOVdLTMvR8k9EL_08w@mail.gmail.com>

Hello btrfs developers/users,

I was wondering regarding to fetching the correct fsid on btrfs from
the context of a kernel module.
if on suse11.3 kernel 3.0.101-0.47.71-default in order to get fsid, I
do the following:
convert inode struct to btrfs_inode struct (use btrfsInode =
BTRFS_I(inode)), then from btrfs_inode struct i go to root field, and
from root i take anon_dev or anon_super.s_dev.
        struct btrfs_inode *btrfsInode;
        btrfsInode = BTRFS_I(inode);
       btrfsInode->root->anon_super.s_dev    or
       btrfsInode->root->anon_dev    - depend on kernel.

In kernel 3.12.28-4-default in order to get the fsid, i need to go
to the inode -> superblock -> device id (inode->i_sb->s_dev)

Why is this ? and is there a proper/an official way to get it ?

       reply	other threads:[~2018-01-14  8:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJUuSvFtEG=CZPjhACCvp8hVA83xFuFpJcScx4xAj4tPkW8uCw@mail.gmail.com>
     [not found] ` <CAJUuSvHo6N+esmjX8+Ly+kV+Nm1bUB=f85Mv=_xoyiLaUFA-ug@mail.gmail.com>
     [not found]   ` <20170301180817.GJ4662@suse.cz>
     [not found]     ` <CAJUuSvHpP-GV50P9dDJxX-WyzqtoHZLiuOVdLTMvR8k9EL_08w@mail.gmail.com>
2018-01-14  8:33       ` Ilan Schwarts [this message]
2018-01-14  9:12         ` Fwd: Fwd: Question regarding to Btrfs patchwork /2831525 Qu Wenruo
2018-01-14  9:13         ` Qu Wenruo
2018-01-14 10:02           ` Ilan Schwarts
2018-01-14 10:04             ` Nikolay Borisov
     [not found]               ` <CAJUuSvGcx3oMMmj=goXurrMRsYpmxjSA8aPmGvrgMTjYbSGz+A@mail.gmail.com>
2018-01-14 10:13                 ` Ilan Schwarts
2018-01-14 10:22                   ` Qu Wenruo
2018-01-14 10:32                     ` Ilan Schwarts
2018-01-14 10:40                       ` Hugo Mills
2018-01-14 10:44                       ` Qu Wenruo
2018-01-15  9:05                         ` Ilan Schwarts
2018-01-15  9:59                           ` Qu Wenruo
2018-01-15  9:24                         ` Ilan Schwarts
2018-01-15 10:01                           ` Qu Wenruo
2018-01-15 12:08                             ` Ilan Schwarts
2018-01-15 12:13                               ` Qu Wenruo
2018-01-17 14:36                                 ` Ilan Schwarts
2018-01-18  5:12                                   ` Qu Wenruo
     [not found]                                     ` <CAJUuSvFrGLYbTfLQjKb1Tcr_TRn9VAX-qmnHaVK4TRR5jMN=wA@mail.gmail.com>
2018-01-18  5:49                                       ` Qu Wenruo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJUuSvFUFnxuoXDE0+ykTXYN4B4GOWps7rAYAiHom6NKMX2nFA@mail.gmail.com \
    --to=ilan84@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.