Fwd:

2017-02-22 Thread Ilan Schwarts
Hi, I previously had a problem that the same device has 2 device Id on btrfs. In order to solve it, i had to use BTRFS_I(inode)->root->anon_super.s_dev instead of inode->i_sb->s_dev My question is, if there is something like that for inodes, All directories on my top level device has the same

[no subject]

2017-03-19 Thread Ilan Schwarts
Hi, sorry if this is a newbie question. I am newbie. In my kernel driver, I get device id by converting struct inode struct to btrfs_inode, I use the code: struct btrfs_inode *btrfsInode; btrfsInode = BTRFS_I(inode); I usually download kernel-headers rpm package, this is not enough. it fails to

include linux kernel headers for btrfs filesystem

2017-03-20 Thread Ilan Schwarts
I need to cast struct inode to struct btrfs_inode. in order to do it, i looked at implementation of btrfs_getattr. the code is simple: struct btrfs_inode *btrfsInode; btrfsInode = BTRFS_I(inode); in order to compile i must add the headers on top of the function: #include

[no subject]

2017-05-28 Thread Ilan Schwarts
unsubscribe linux-btrfs -- - Ilan Schwarts -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Fwd: Fwd: Question regarding to Btrfs patchwork /2831525

2018-01-17 Thread Ilan Schwarts
.. When printing from kernel BTRFS_I(inode)->root->anon_dev - I receive the number 2. and not 31h/49d. On Mon, Jan 15, 2018 at 2:13 PM, Qu Wenruo <quwenruo.bt...@gmx.com> wrote: > > > On 2018年01月15日 20:08, Ilan Schwarts wrote: >> Thanks for detailed information ! >

Fwd: Fwd: Question regarding to Btrfs patchwork /2831525

2018-01-14 Thread Ilan Schwarts
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)),

Re: Fwd: Fwd: Question regarding to Btrfs patchwork /2831525

2018-01-14 Thread Ilan Schwarts
? I need to create unique identifier for a file, I need to understand if the identifier would be: GlobalFSID_DeviceID_Inode or DeviceID_Inode is enough. Thanks On Sun, Jan 14, 2018 at 11:13 AM, Qu Wenruo <quwenruo.bt...@gmx.com> wrote: > > > On 2018年01月14日 16:33, Ilan Schwarts

Re: Fwd: Fwd: Question regarding to Btrfs patchwork /2831525

2018-01-14 Thread Ilan Schwarts
both btrfs filesystems will have same fsid ? On Sun, Jan 14, 2018 at 12:06 PM, Ilan Schwarts <ila...@gmail.com> wrote: > But both filesystems will have same fsid? > > On Jan 14, 2018 12:04, "Nikolay Borisov" <nbori...@suse.com> wrote: >> >> >

btrfs inode is different across file systems ?

2018-01-22 Thread Ilan Schwarts
Hey, If I get btrfs inode in this way: btrfs_ino(inode) implemented at btrfs_inode.h: static inline u64 btrfs_ino(struct inode *inode) { u64 ino = BTRFS_I(inode)->location.objectid; if (!ino || BTRFS_I(inode)->location.type == BTRFS_ROOT_ITEM_KEY) ino = inode->i_ino; return ino; } Is that inode

miss match in btrfs getattr

2018-01-22 Thread Ilan Schwarts
If i stat a file from userspace: File: ‘/home/builder/leon10’ Size: 0 Blocks: 0 IO Block: 4096 directory Device: 31h/49d Inode: 550109 Links: 1 Inode is 550109 and device id is 49. When I am in the kernel, I try to get that device id (49), I

Re: Fwd: Fwd: Question regarding to Btrfs patchwork /2831525

2018-01-15 Thread Ilan Schwarts
Qu, Given inode, i get the fsid via: inode->i_sb->s_dev; this return dev_t and not u8/u16 On Sun, Jan 14, 2018 at 12:44 PM, Qu Wenruo <quwenruo.bt...@gmx.com> wrote: > > > On 2018年01月14日 18:32, Ilan Schwarts wrote: >> Thank you for clarification. >> Just 2 quick

Re: Fwd: Fwd: Question regarding to Btrfs patchwork /2831525

2018-01-14 Thread Ilan Schwarts
wrote: > > > On 2018年01月14日 18:13, Ilan Schwarts wrote: >> both btrfs filesystems will have same fsid ? >> >> >> On Sun, Jan 14, 2018 at 12:06 PM, Ilan Schwarts <ila...@gmail.com> wrote: >>> But both filesystems will have same fsid? >>> >>

Re: Fwd: Fwd: Question regarding to Btrfs patchwork /2831525

2018-01-15 Thread Ilan Schwarts
t; Qu > >> >> >> On Sun, Jan 14, 2018 at 12:44 PM, Qu Wenruo <quwenruo.bt...@gmx.com> wrote: >>> >>> >>> On 2018年01月14日 18:32, Ilan Schwarts wrote: >>>> Thank you for clarification. >>>> Just 2 quick questions, >>>> 1.

Re: Fwd: Fwd: Question regarding to Btrfs patchwork /2831525

2018-01-15 Thread Ilan Schwarts
> wrote: > > > On 2018年01月14日 18:32, Ilan Schwarts wrote: >> Thank you for clarification. >> Just 2 quick questions, >> 1. Sub volumes - 2 sub volumes cannot have 2 same inode numbers ? > > They can. > > So to really locate an inode in btrfs, you need: &

calling inode->i_op->getattr to get kstat structure to obtain device id

2018-02-14 Thread Ilan Schwarts
ode->i_op->getattr(...) with the 2nd dual dentry -> I get btrfs_getattr exception. Is there a solution ? This happens on Suse kernel 3.12.69-60 - hello david s :) -- - Ilan Schwarts -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to maj

error: redefinition of 'struct btrfs_ioctl_defrag_range_args

2018-04-11 Thread Ilan Schwarts
Hi While trying to compile my kernel module on suse 12.2 kernel 4.4.103-92.53-default I recieve the following warning: error: redefinition of 'struct btrfs_ioctl_defrag_range_args I see that struct is defined in 2 places: /lib/modules/4.4.103-92.53-default/source/fs/btrfs/ctree.h:1985:8

Re: error: redefinition of 'struct btrfs_ioctl_defrag_range_args

2018-04-16 Thread Ilan Schwarts
Thanks. If you see no problems, then its probably locally on my machine. On Thu, Apr 12, 2018 at 5:10 PM, David Sterba <dste...@suse.cz> wrote: > On Wed, Apr 11, 2018 at 01:22:23PM +0300, Ilan Schwarts wrote: >> Hi >> While trying to compile my kernel module on suse 12.2 ke

Why btrfsInode -> root is null

2018-04-16 Thread Ilan Schwarts
Hi all, I maintain kernel module on top of VFS. When action executes, e.g vfs_rename, i get dentry object. I need to get the fsid from the dentry object. Since I maintain the same code for alot of suse distro and kernels (11.4, 12.0, 12.1, 12.2), i have many #if macros, My question is in SLES