If running back Joe Williams fails to make the San Francisco 49ers' roster this season, it won't be due to a lack of effort. It sounds like head coach Kyle Shanahan and his staff have been impressed with the second-year player who spent all of last season on injured reserve.

Williams used his time off to mentally and physically prepare himself to compete for a roster spot and playing time in 2018. He is battling Raheem Mostert for the right to play behind Jerick McKinnon and Matt Breida. While Williams has looked good so far, coaches can't evaluate his progress until the pads go on for training camp and preseason.

"I think his body looks a lot better than it did last year," Shanahan said this week. "He's put on a lot of muscle mass just with how he's worked and has taken advantage of the year of not playing. I think he has just a different mindset, understands a little bit more of the standard of the NFL, and the difference.

"Sometimes it takes guys time. It's not always malicious. It just takes time to understand it and what you have to do day in and day out. I think Joe has made some huge strides between now and last year. I think that's why he'll have a chance."

David Lombardi of The Athletic has also been impressed with Williams' offseason efforts.

"I think there were whispers, and nobody will say it directly, but people, I think, speculated that he was a bit out of shape heading into camp last year," Lombardi said on KNBR Wednesday. "I don't think that's going to be the case at all this year. One thing that the running backs coach, Bobby Turner, does at practice, he encourages all of his running backs to play through every whistle and then sprint 40 or 50 yards straight downfield with their helmet on after the play. That's a way of getting guys in shape.

"I can tell you from watching these practices that nobody takes this more seriously than Joe Williams. He puts his head down and does the 40-yard dash out there after every single time he touches the ball after he's been tackled. And I know that the 49ers are happy about that. They think that he's going to be in shape, but it will all come down to ball security."

Linebacker Mark Nzeocha stripped the football out of Williams' arms during Tuesday's practice. That came less than two hours after Shanahan praised the running back but identified ball protection as an aspect of his game that needed work.

"It was kind of a weird play, and I know pads aren't on yet, but one of the linebackers stripped him. And I think fumbles were a big problem for him at Utah, and they were an issue last preseason, and the 49ers really want to make sure that's taken care of by training camp," Lombardi continued.

While Williams lost a fumble during a preseason matchup against the Los Angeles Chargers last year, he also averaged 5.2 yards on 25 carries.

Williams will have to stay in shape (and work on protecting the football) during the team's six weeks off before training camp to have a shot at grabbing a roster spot. Shanahan emphasized to his players the importance of staying in shape while they are away from the facilities and their coaches.

"We had 90 guys work as hard as they could for these past two months or whatever it is, and now they're going to still work, but we're not going to be around them for a month," Shanahan said on Wednesday. "Most guys are fine, but there's always that small percent that hasn't been scarred, that thinks they can just relax and rest and be ready for training camp.

"What those people don't realize is that you come to training camp thinking you're going to get into shape in training camp, and you usually pull a hamstring on the first couple days. Then you're out for three weeks. Then you come in for the last preseason game, and you don't totally feel right, and then you either don't make the team, you don't make practice squad, or you make it because of your history, but you don't look the same in Week 1 because you haven't gone through it all. It's a trickle-down effect throughout the whole year."

You can listen to the entire interview with Lombardi below.