Re: [PATCH v2] scsi: sd_zbc: trace zone append emulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28.11.22 09:54, Johannes Thumshirn wrote:
>>
>> This is missing:
>>
>> diff --git a/drivers/scsi/scsi_trace.c b/drivers/scsi/scsi_trace.c
>> index 41a950075913..224b38c0fb0f 100644
>> --- a/drivers/scsi/scsi_trace.c
>> +++ b/drivers/scsi/scsi_trace.c
>> @@ -389,3 +389,4 @@ scsi_trace_parse_cdb(struct trace_seq *p, unsigned
>> char *cdb, int len)
>>                 return scsi_trace_misc(p, cdb, len);
>>         }
>>  }
>> +EXPORT_SYMBOL(scsi_trace_parse_cdb);
>> diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
>> index 956d1982c51b..e7a0e1ace6d0 100644
>> --- a/drivers/scsi/sd_zbc.c
>> +++ b/drivers/scsi/sd_zbc.c
>> @@ -18,6 +18,7 @@
>>  #include <scsi/scsi.h>
>>  #include <scsi/scsi_cmnd.h>
>>
>> +#define CREATE_TRACE_POINTS
>>  #include <trace/events/scsi.h>
>>
>>  #include "sd.h"
>>
>> With that, it compiles fine.
>>
> 
> Thanks, but for me it doesn't when I have scsi_mod builtin,
> only as a module :(
> If I remove the CREATE_TRACE_POINTS hunk it compiles again as
> builtin but breaks as module :(
> 
> 

This is working for me, but having to use #if IS_MODULE() feels
kinda hackish.

Martin your call:

diff --git a/drivers/scsi/scsi_trace.c b/drivers/scsi/scsi_trace.c
index 41a950075913..224b38c0fb0f 100644
--- a/drivers/scsi/scsi_trace.c
+++ b/drivers/scsi/scsi_trace.c
@@ -389,3 +389,4 @@ scsi_trace_parse_cdb(struct trace_seq *p, unsigned char *cdb, int len)
                return scsi_trace_misc(p, cdb, len);
        }
 }
+EXPORT_SYMBOL(scsi_trace_parse_cdb);
diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
index 956d1982c51b..d84578df27c8 100644
--- a/drivers/scsi/sd_zbc.c
+++ b/drivers/scsi/sd_zbc.c
@@ -18,7 +18,10 @@
 #include <scsi/scsi.h>
 #include <scsi/scsi_cmnd.h>
 
+#if IS_MODULE(CONFIG_BLK_DEV_SD)
+#define CREATE_TRACE_POINTS
 #include <trace/events/scsi.h>
+#endif
 
 #include "sd.h"
 





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux