NVSL / PMFS-new

Porting PMFS to the latest Linux kernel
15 stars 25 forks source link

passing argument 1 of ‘bdev_dax_supported’ from incompatible pointer type #2

Open Taya666 opened 4 years ago

Taya666 commented 4 years ago

Hi ! I am trying to use PMFS . My kernel version is 4.15. But I met some problem when I run make. It reports that :

/home/parallels/PMFS-new/super.c: In function ‘pmfs_get_block_info’: /home/parallels/PMFS-new/super.c:110:27: error: passing argument 1 of ‘bdev_dax_supported’ from incompatible pointer type [-Werror=incompatible-pointer-types] ret = bdev_dax_supported(sb, PAGE_SIZE); ^~ In file included from /home/parallels/PMFS-new/super.c:35:0: ./include/linux/dax.h:44:20: note: expected ‘struct block_device ’ but argument is of type ‘struct super_block ’ static inline bool bdev_dax_supported(struct block_device *bdev, int blocksize) ^~~~~~ cc1: some warnings being treated as errors

So I tried to auto change it's type by

ret = bdev_dax_supported((struct block_device *)sb, PAGE_SIZE) But It lead to bug when mounting pmfs. The dmesg shows

[ 119.700620] RIP: __bdev_dax_supported+0x8b/0x237 RSP: ffffa5dcc3527cb0

Could you give me some help? Thanks

Andiry commented 4 years ago

Replace the line with ret = bdev_dax_supported(sb->bdev, PAGE_SIZE); Hope that helps.

Thanks, Andiry

On Thu, Mar 5, 2020 at 11:43 PM Taya notifications@github.com wrote:

Hi ! I am trying to use PMFS . My kernel version is 4.15. But I met some problem when I run make. It reports that :

/home/parallels/PMFS-new/super.c: In function ‘pmfs_get_block_info’: /home/parallels/PMFS-new/super.c:110:27: error: passing argument 1 of ‘bdev_dax_supported’ from incompatible pointer type [-Werror=incompatible-pointer-types] ret = bdev_dax_supported(sb, PAGE_SIZE); ^~ In file included from /home/parallels/PMFS-new/super.c:35:0: ./include/linux/dax.h:44:20: note: expected ‘struct block_device ’ but argument is of type ‘struct super_block ’ static inline bool bdev_dax_supported(struct block_device *bdev, int blocksize) ^~~~~~ cc1: some warnings being treated as errors

So I tried to auto change it's type by

ret = bdev_dax_supported((struct block_device *)sb, PAGE_SIZE) But It lead to bug when mounting pmfs. The dmesg shows

[ 119.700620] RIP: __bdev_dax_supported+0x8b/0x237 RSP: ffffa5dcc3527cb0

Could you give me some help? Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NVSL/PMFS-new/issues/2?email_source=notifications&email_token=AAKBYEDX4ZRN4WEDIYI6YGTRGCSQFA5CNFSM4LC2Q6XKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ITASUVA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKBYEGE35DIAUIII64HSATRGCSQFANCNFSM4LC2Q6XA .

Andiry commented 4 years ago

Sorry, should be ret = bdev_dax_supported(sb->s_bdev, PAGE_SIZE);

On Fri, Mar 6, 2020 at 8:54 AM Andiry Xu jix024@eng.ucsd.edu wrote:

Replace the line with ret = bdev_dax_supported(sb->bdev, PAGE_SIZE); Hope that helps.

Thanks, Andiry

On Thu, Mar 5, 2020 at 11:43 PM Taya notifications@github.com wrote:

Hi ! I am trying to use PMFS . My kernel version is 4.15. But I met some problem when I run make. It reports that :

/home/parallels/PMFS-new/super.c: In function ‘pmfs_get_block_info’: /home/parallels/PMFS-new/super.c:110:27: error: passing argument 1 of ‘bdev_dax_supported’ from incompatible pointer type [-Werror=incompatible-pointer-types] ret = bdev_dax_supported(sb, PAGE_SIZE); ^~ In file included from /home/parallels/PMFS-new/super.c:35:0: ./include/linux/dax.h:44:20: note: expected ‘struct block_device ’ but argument is of type ‘struct super_block ’ static inline bool bdev_dax_supported(struct block_device *bdev, int blocksize) ^~~~~~ cc1: some warnings being treated as errors

So I tried to auto change it's type by

ret = bdev_dax_supported((struct block_device *)sb, PAGE_SIZE) But It lead to bug when mounting pmfs. The dmesg shows

[ 119.700620] RIP: __bdev_dax_supported+0x8b/0x237 RSP: ffffa5dcc3527cb0

Could you give me some help? Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NVSL/PMFS-new/issues/2?email_source=notifications&email_token=AAKBYEDX4ZRN4WEDIYI6YGTRGCSQFA5CNFSM4LC2Q6XKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ITASUVA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKBYEGE35DIAUIII64HSATRGCSQFANCNFSM4LC2Q6XA .

Taya666 commented 4 years ago

Sorry, should be ret = bdev_dax_supported(sb->s_bdev, PAGE_SIZE); On Fri, Mar 6, 2020 at 8:54 AM Andiry Xu @.> wrote: Replace the line with ret = bdev_dax_supported(sb->bdev, PAGE_SIZE); Hope that helps. Thanks, Andiry On Thu, Mar 5, 2020 at 11:43 PM Taya @.> wrote: > Hi ! > I am trying to use PMFS . My kernel version is 4.15. But I met some > problem when I run make. It reports that : > > /home/parallels/PMFS-new/super.c: In function ‘pmfs_get_block_info’: > /home/parallels/PMFS-new/super.c:110:27: error: passing argument 1 of > ‘bdev_dax_supported’ from incompatible pointer type > [-Werror=incompatible-pointer-types] > ret = bdev_dax_supported(sb, PAGE_SIZE); > ^~ > In file included from /home/parallels/PMFS-new/super.c:35:0: > ./include/linux/dax.h:44:20: note: expected ‘struct block_device ’ but > argument is of type ‘struct super_block ’ > static inline bool bdev_dax_supported(struct block_device bdev, int > blocksize) > ^~~~~~ > cc1: some warnings being treated as errors > > So I tried to auto change it's type by > > ret = bdev_dax_supported((struct block_device )sb, PAGE_SIZE) > But It lead to bug when mounting pmfs. The dmesg shows > > [ 119.700620] RIP: __bdev_dax_supported+0x8b/0x237 RSP: ffffa5dcc3527cb0 > > Could you give me some help? > Thanks > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <#2?email_source=notifications&email_token=AAKBYEDX4ZRN4WEDIYI6YGTRGCSQFA5CNFSM4LC2Q6XKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ITASUVA>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AAKBYEGE35DIAUIII64HSATRGCSQFANCNFSM4LC2Q6XA > . >

It works. Thanks you so much !