LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 06-30-2017, 11:21 AM   #1
dfatlq
Member
 
Registered: May 2012
Posts: 49

Rep: Reputation: Disabled
Did the vfs_read and related functions get changed?


Have a driver that allows mounting a virtual drive that has a proprietary format. Driver working fine from 3.x up through the last one tried that works was 4.9.13 (didn't try other 4.9 or 4.10), but on 4.11.7, it doesn't work, read error every time. Did it get broke? Is there new requirement, redefined items, etc..?

Basically it looks like this:

Code:
int driver_file_read(struct file *file, unsigned char *data, unsigned int size)
{
  int ret;
  mm_segment_t oldfs;

  loff_t pos = file->f_pos;

   oldfs   = get_fs();
  set_fs(get_ds());

  ret=vfs_read(file, data, size, &pos);

  set_fs(oldfs);

  // update file pointer
  file->f_pos=pos;

   return (ret);
}
 
Old 06-30-2017, 07:48 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
I did notice some changes to the block driver code in 4.10 and early 4.11 - caused some kernel tracing logic to fail. There seemed to be a lot of variable renaming at that time. A recompile should point you in the right direction, else you'll have to check the commit logs. All of them unless you can narrow down the kernel that first fails.
 
Old 06-30-2017, 08:49 PM   #3
dfatlq
Member
 
Registered: May 2012
Posts: 49

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
I did notice some changes to the block driver code in 4.10 and early 4.11 - caused some kernel tracing logic to fail. There seemed to be a lot of variable renaming at that time. A recompile should point you in the right direction, else you'll have to check the commit logs. All of them unless you can narrow down the kernel that first fails.
Turns out of course it was my fault. A new property of an object in a support library used required an initialization which wasn't added on the linux driver object initialization.

Last edited by dfatlq; 07-01-2017 at 12:11 AM. Reason: Correction
 
Old 07-01-2017, 01:35 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Good for you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vfs_read hangs when serving a request (kernel module) eantoranz Programming 21 09-12-2014 10:49 AM
Installed Ubuntu but it changed my boot loader. I want this changed... mdorries Linux - Distributions 8 05-31-2007 08:13 PM
LXer: OpenOffice.org Calc functions, part 1: Understanding functions LXer Syndicated Linux News 0 03-31-2007 12:01 PM
reg. vfs_read() call ksrinivas Linux - Newbie 0 10-11-2006 07:34 AM
ipsec related functions atul_mehrotra Linux - Security 0 05-17-2005 03:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration